Re: GNU assembler freaks out at jumps and Intel syntax
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Ah, you have some reason other than logic for using Intel syntax. Change it to this: 1: L5: popl %ebx cmpl $2, 8(%ebp) je L2 leal LC0-"L00000000001$pb"(%ebx), %eax movl %eax, (%esp) call L_puts$stub .intel_syntax noprefix test %eax, %eax jnz 1b .att_syntax -- Terry This assembles (and links) correctly: testl %eax,%eax jnz L5 This will fail: .intel_syntax noprefix test eax,eax jnz L5 .att_syntax foo.s:28:suffix or operands invalid for `jnz' Luigi _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Sep 15, 2008, at 4:15 PM, LuigiG wrote: But that's using the AT&T syntax. That has always worked fine for me too, it's only when you switch to Intel syntax that you get problems. If I chnage your example to use Intel syntax (even limited to that small bit of code), it doesn't work anymore: So, is this a bug in gas? Or must I prepend/append something "L5" when using Intel syntax? (which would seem to contradict the "noprefix" option!) Note: I'm on an intel Mac and both -arch i386 and -arch x86_64 give the same result. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert