Hi Richard,
On 4 Dec 2011, at 20:45, Richard Henderson wrote:
On 12/03/2011 09:20 AM, Iain Sandoe wrote:
version 2 is a modification of your original:
a) -FRAME+BASE(r1) cannot be guaranteed to be vec-aligned in
general (it isn't on m32 darwin)
... so I've taken the liberty of rounding the gtm_buffer object and
then pointing r4 at original_sp-rounded_size, which is what we
want for the call to GTM_begin_transaction anyway.
I've kept this in the version below, but I cannot see how that can be,
since your version of BASE is 8*WS = 64, a multiple of 16.
BASE is 2* WS for sysv, 6 for AIX and is only 8 on Darwin by luck
because we happen to have 2 params to the called routine...
b) I've added the CR etc. wrapped in __MACH__ ifdefs.
Taken out of the ifdefs to be done everywhere.
where is "_CALL_DARWIN" supposed to come from? (it is not defined by
the preprocessor AFAICT).
I can produce a patch to add it if that's an oversight in the Darwin
port.
e) The real problem is finding a non-horrible way of dealing with
the %r <=> r issue - and I've not done that so far...
Dropped the %r entirely and using bare numbers, which is what the
compiler
emits by default.
not for the darwin version - it needs the 'r,v, and f' :-(
(sorry, .. working on binutils but it's gonna take some more time)
I kept the %[rfv] in the cfi directives though;
I assume that darwin simply doesn't have those and so it won't be an
issue.
no - which is why I also need to cook up an eh_frame section by hand
sometime... (likewise on Darwin x86)
Give this a go.
with edited in 'r,v,f' _CALL_DARWIN defined on __MACH__
Works OK modulo " bl name" needs the __USER_LABEL_PREFIX__
how about?
__ELF__
.macro CALL name
bl \name
.endm
__MACH__
.macro CALL name
bl _$0
.endmacro
cheers
Iain