Asm question (port from linux ppc)
Asm question (port from linux ppc)
- Subject: Asm question (port from linux ppc)
- From: email@hidden
- Date: 27 Nov 2004 04:03:26 -0000
I trying to port an app from linux PPC to MacOSX. There is a short (3 lines)
routine in assembly that changes the stack pointer. The code assembles
fine in linux with both gcc 2.95 and 3.3.4 but Darwin gcc 3.1 doesn't
like it. I tried compiling a couple of short test programs to assembler
on both platforms and looked at the generated code. It looked pretty
different. Any ideas?? The code just moves a new stack pointer from a global
variable into the stack pointer register (1) and returns.
$cat setsp.s
.globl _setstack
_setstack:
lis 1, newstackptr@ha
lwz 1, newstackptr@l(1)
blr
.align 4
% cc setsp.S
setsp.s:5:Parameter syntax error (parameter 1)
setsp.s:5:Invalid mnemonic 'ha'
setsp.s:6:Parameter syntax error (parameter 2)
setsp.s:6:Invalid mnemonic 'l(r1)'
-- bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden