expecting string instruction after `rep' with latest SeaBIOS
Building the seabios defconfig on a 64-bit Debian Wheezy system I'm seeing:
Compiling (16bit) out/romlayout.osrc/romlayout.S: Assembler messages:src/romlayout.S:285: Error: expecting string instruction after `rep'
make: *** [out/romlayout.o] Error 1
That line is:
// Acquire lock and take ownership of shared stack
1: rep nop
I've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
This is with 083ee297ef88d "ohci: Update usb command timeouts to use usb_xfer_time()". I don't see it with the rel-1.7.5 tag.
git bisect has fingered 0673b7870063a ""smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode.", which makes sense since it made those additions to romlayout.S
Other than a compiler bug I can't think what might be going on. Debian Wheezy has gcc 4.7.2 and binutils 2.22.
Ian.
Il 30/06/2014 15:03, Ian Campbell ha scritto:
Quoted 6 lines
That line is:
// Acquire lock and take ownership of shared stack
1: rep nopI've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause".
I think the assembler wants "rep; nop" instead.
Paolo
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Paolo Bonzini
Il 30/06/2014 15:03, Ian Campbell ha scritto:
Quoted 6 lines
That line is:
// Acquire lock and take ownership of shared stack
1: rep nopI've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause".
Yes, that's how I was translating it in my head, which is why I thought it was fine to write it like that.
Quoted 1 line
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch:
8<------------------------
Quoted 1 line
From
0b05042b582a8992c15030406dcb220be82da8ceMon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 30 Jun 2014 14:10:02 +0100
Subject: [PATCH] romlayout: Use "rep ; nop" not "rep nop".
Fixes:
Compiling (16bit) out/romlayout.osrc/romlayout.S: Assembler messages:src/romlayout.S:285: Error: expecting string instruction after `rep'
make: *** [out/romlayout.o] Error 1
--- src/romlayout.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/romlayout.S +1 -1
@@ -282,7 +282,7 @@ entry_smp: jmp transition32 .code32 // Acquire lock and take ownership of shared stack -1: rep nop +1: rep ; nop 2: lock btsl $0, SMPLock jc 1b movl SMPStack, %esp
Signature · 1 line
1.7.10.4
Paolo Bonzini
Reviewed-byIl 30/06/2014 15:11, Ian Campbell ha scritto:
Quoted 43 lines · Paolo Bonzini
Quoted 9 lines
Il 30/06/2014 15:03, Ian Campbell ha scritto:
Quoted 6 lines
That line is:
// Acquire lock and take ownership of shared stack
1: rep nopI've also checked the preprocessed version and the nop isn't being disappeared or anything like that.
"rep nop" is really just "pause".
Yes, that's how I was translating it in my head, which is why I thought it was fine to write it like that.
Quoted 1 line
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch:
8<------------------------
From
0b05042b582a8992c15030406dcb220be82da8ceMon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 30 Jun 2014 14:10:02 +0100
Subject: [PATCH] romlayout: Use "rep ; nop" not "rep nop".Fixes:
Compiling (16bit)out/romlayout.osrc/romlayout.S: Assembler messages:src/romlayout.S:285: Error: expecting string instruction after `rep'
make: *** [out/romlayout.o] Error 1Signed-off-by Ian Campbell <[email protected]>--- src/romlayout.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/romlayout.S +0
-0
src/romlayout.S entry_smp: · line 288
Quoted 8 lines
src/romlayout.S +1
-1@@ -282,7 +282,7 @@ entry_smp: jmp transition32 .code32 // Acquire lock and take ownership of shared stack -1: rep nop +1: rep ; nop 2: lock btsl $0, SMPLock jc 1b movl SMPStack, %esp
Quoted 4 lines · Ian Campbell
Quoted 1 line
I think the assembler wants "rep; nop" instead.
That's right, I was just reaching the same conclusion. Build-tested patch:
Thanks - I applied this change.
-Kevin