Whats wrong with my ASM Code with GCC 4.1

Steven Johnson sjohnson@sakuraindustries.com
Sat Mar 11 00:52:00 GMT 2006


Im sorry if this has been covered before, but ive tried to search the
archives and havent found anything conclusive on it.

I have recently tried to upgrade one of my embedded development targets
to GCC V4.1.

But to my horror, all of my ASM statements refuse to compile, statements
of the form:

asm volatile ("
  mov ax,bx
  mov bx,cx
  mov cx,dx

Which worked fine under GCC 3.2.x.

Now i have heaps of statements like this, and they are all many many
lines long.  I know through experimentation that i can get it to work by
doing this:

asm volatile (
"  mov ax,bx"
"  mov bx,cx"
"  mov cx,dx"

But that is just hideous, and will be very tedious to both change and
then maintain.

Whats wrong, why has this broken?  Im hoping that someone wont tell me
GCC doesnt support multi line strings on asm statements anymore and that
ive just stuffed it up somehow.

Any help would be greatly appreciated.


More information about the Gcc-help mailing list