Bug 603 - Error: suffix or operands invalid for `push'
Summary: Error: suffix or operands invalid for `push'
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 17:33 UTC by Orion Poplawski
Modified: 2004-12-14 00:04 UTC (History)
1 user (show)

See Also:
Host: x86_64-redhat-linux
Target: x86_64-redhat-linux
Build: x86_64-redhat-linux
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Orion Poplawski 2004-12-09 17:33:34 UTC
On FC2 x86_64 with gas version 2.15.90.0.3 (x86_64-redhat-linux) using BFD
version 2.15.90.0.3 20040415, the following code compiles file.  On FC3 x86_64
with gas version 2.15.92.0.2 (x86_64-redhat-linux) using BFD version 2.15.92.0.2
20040927 I get the errors:


sse2-cpuid.s: Assembler messages:
sse2-cpuid.s:27: Error: suffix or operands invalid for `push'
sse2-cpuid.s:29: Error: suffix or operands invalid for `pop'

Same error if I use pushl/popl.

        .file   "sse2-cpuid.c"
        .text
.globl RIGHT_CPU
        .type   RIGHT_CPU, @function
RIGHT_CPU:
.LFB5:
        pushq   %rbp
.LCFI0:
        movq    %rsp, %rbp
.LCFI1:
        movl    $1, %edi
        call    cpuid_edx
        leave
        ret
.LFE5:
        .size   RIGHT_CPU, .-RIGHT_CPU
        .type   cpuid_edx, @function
cpuid_edx:
.LFB3:
        pushq   %rbp
.LCFI2:
        movq    %rsp, %rbp
.LCFI3:
        movl    %edi, -4(%rbp)
        movl    -4(%rbp), %eax
#APP
        push %ebx
        cpuid
        pop %ebx
#NO_APP
        movl    %eax, -8(%rbp)
        movl    %ecx, %eax
        movl    %eax, -12(%rbp)
        movl    %edx, %eax
        movl    %eax, -16(%rbp)
        movl    -16(%rbp), %eax
        leave
        ret
.LFE3:
        .size   cpuid_edx, .-cpuid_edx
        .section        .eh_frame,"a",@progbits
.Lframe1:
        .long   .LECIE1-.LSCIE1
.LSCIE1:
        .long   0x0
        .byte   0x1
        .string ""
        .uleb128 0x1
        .sleb128 -8
        .byte   0x10
        .byte   0xc
        .uleb128 0x7
        .uleb128 0x8
        .byte   0x90
        .uleb128 0x1
        .align 8
.LECIE1:
.LSFDE1:
        .long   .LEFDE1-.LASFDE1
.LASFDE1:
        .long   .LASFDE1-.Lframe1
        .quad   .LFB5
        .quad   .LFE5-.LFB5
        .byte   0x4
        .long   .LCFI0-.LFB5
        .byte   0xe
        .uleb128 0x10
        .byte   0x86
        .uleb128 0x2
        .byte   0x4
        .long   .LCFI1-.LCFI0
        .byte   0xd
        .uleb128 0x6
        .align 8
.LEFDE1:
.LSFDE3:
        .long   .LEFDE3-.LASFDE3
.LASFDE3:
        .long   .LASFDE3-.Lframe1
        .quad   .LFB3
        .quad   .LFE3-.LFB3
        .byte   0x4
        .long   .LCFI2-.LFB3
        .byte   0xe
        .uleb128 0x10
        .byte   0x86
        .uleb128 0x2
        .byte   0x4
        .long   .LCFI3-.LCFI2
        .byte   0xd
        .uleb128 0x6
        .align 8
.LEFDE3:
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)"
Comment 1 Orion Poplawski 2004-12-14 00:04:25 UTC
looks like we need to push/pop %rbx in 64-bit mode.