* Assembler messages
@ 2009-01-28 10:55 cristi marius
2009-01-28 12:30 ` John (Eljay) Love-Jensen
2009-01-30 0:57 ` Bob Plantz
0 siblings, 2 replies; 4+ messages in thread
From: cristi marius @ 2009-01-28 10:55 UTC (permalink / raw)
To: gcc-help
Hello,
I would like to give me some advice for this problem
I compile and run a c++ program on 32bit sistem ; it works very well
but running it on a 64bit system gives me the following errors
$ make
cc -O2 -c -o obsr.o obsr.c
cc -O2 -c -o ro.o ro.c
cc -O2 -c -o tag.o tag.c
as -o hit.o hit.s
as -o hintm1.o hintm1.s
hintm1.s: Assembler messages:
hintm1.s:72: Error: suffix or operands invalid for `push'
hintm1.s:74: Error: suffix or operands invalid for `push'
hintm1.s:75: Error: suffix or operands invalid for `push'
hintm1.s:76: Error: suffix or operands invalid for `push'
hintm1.s:94: Error: suffix or operands invalid for `push'
hintm1.s:95: Error: suffix or operands invalid for `push'
hintm1.s:122: Error: suffix or operands invalid for `push'
hintm1.s:139: Error: suffix or operands invalid for `push'
hintm1.s:153: Error: suffix or operands invalid for `push'
hintm1.s:154: Error: suffix or operands invalid for `push'
hintm1.s:224: Error: suffix or operands invalid for `push'
hintm1.s:225: Error: suffix or operands invalid for `push'
hintm1.s:226: Error: suffix or operands invalid for `push'
hintm1.s:227: Error: suffix or operands invalid for `push'
hintm1.s:235: Error: suffix or operands invalid for `push'
hintm1.s:236: Error: suffix or operands invalid for `push'
hintm1.s:237: Error: suffix or operands invalid for `push'
hintm1.s:262: Warning: translating to `fld %st(1)'
hintm1.s:436: Warning: translating to `fld %st(3)'
hintm1.s:633: Warning: translating to `fld %st(3)'
hintm1.s:683: Error: suffix or operands invalid for `pop'
hintm1.s:684: Error: suffix or operands invalid for `pop'
hintm1.s:685: Error: suffix or operands invalid for `pop'
hintm1.s:686: Error: suffix or operands invalid for `pop'
hintm1.s:734: Error: suffix or operands invalid for `pop'
hintm1.s:735: Error: suffix or operands invalid for `pop'
hintm1.s:736: Error: suffix or operands invalid for `pop'
make: *** [hintm1.o] Error 1
I think the problem is with assembler
Please let me know how I must to proceed for running the program
Thanks & Regards,
tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Assembler messages
2009-01-28 10:55 Assembler messages cristi marius
@ 2009-01-28 12:30 ` John (Eljay) Love-Jensen
2009-01-30 0:57 ` Bob Plantz
1 sibling, 0 replies; 4+ messages in thread
From: John (Eljay) Love-Jensen @ 2009-01-28 12:30 UTC (permalink / raw)
To: mstroe2000, GCC-help
Hi tony,
My first guess is that you have 32-bit assembly source code, but do not have 64-bit assembly source code.
HTH,
--Eljay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Assembler messages
2009-01-28 10:55 Assembler messages cristi marius
2009-01-28 12:30 ` John (Eljay) Love-Jensen
@ 2009-01-30 0:57 ` Bob Plantz
1 sibling, 0 replies; 4+ messages in thread
From: Bob Plantz @ 2009-01-30 0:57 UTC (permalink / raw)
To: mstroe2000; +Cc: gcc-help
On Wed, 2009-01-28 at 02:55 -0800, cristi marius wrote:
> $ make
> cc -O2 -c -o obsr.o obsr.c
> cc -O2 -c -o ro.o ro.c
> cc -O2 -c -o tag.o tag.c
> as -o hit.o hit.s
> as -o hintm1.o hintm1.s
> hintm1.s: Assembler messages:
> hintm1.s:72: Error: suffix or operands invalid for `push'
> hintm1.s:74: Error: suffix or operands invalid for `push'
> hintm1.s:75: Error: suffix or operands invalid for `push'
> hintm1.s:76: Error: suffix or operands invalid for `push'
> hintm1.s:94: Error: suffix or operands invalid for `push'
> hintm1.s:95: Error: suffix or operands invalid for `push'
> hintm1.s:122: Error: suffix or operands invalid for `push'
> hintm1.s:139: Error: suffix or operands invalid for `push'
> hintm1.s:153: Error: suffix or operands invalid for `push'
> hintm1.s:154: Error: suffix or operands invalid for `push'
> hintm1.s:224: Error: suffix or operands invalid for `push'
> hintm1.s:225: Error: suffix or operands invalid for `push'
> hintm1.s:226: Error: suffix or operands invalid for `push'
> hintm1.s:227: Error: suffix or operands invalid for `push'
> hintm1.s:235: Error: suffix or operands invalid for `push'
> hintm1.s:236: Error: suffix or operands invalid for `push'
> hintm1.s:237: Error: suffix or operands invalid for `push'
> hintm1.s:262: Warning: translating to `fld %st(1)'
> hintm1.s:436: Warning: translating to `fld %st(3)'
> hintm1.s:633: Warning: translating to `fld %st(3)'
> hintm1.s:683: Error: suffix or operands invalid for `pop'
> hintm1.s:684: Error: suffix or operands invalid for `pop'
> hintm1.s:685: Error: suffix or operands invalid for `pop'
> hintm1.s:686: Error: suffix or operands invalid for `pop'
> hintm1.s:734: Error: suffix or operands invalid for `pop'
> hintm1.s:735: Error: suffix or operands invalid for `pop'
> hintm1.s:736: Error: suffix or operands invalid for `pop'
> make: *** [hintm1.o] Error 1
> I think the problem is with assembler
It's not the assembler. hintml.s and probably hit.s are written in
32-bit assembly code. 32-bit code pushes and pops the 32-bit portions of
the registers, i.e., something like
pushl %ebp
....
popl %ebp
In 64-bit code the stack cannot be addressed with 32 bits, so the full
64 bits of the register must be pushed/popped:
pushq %rbp
....
popq %rbp
The problems go far beyond this. I'm assuming that hit.s and hintml.s
contain functions that are called from the C++ code, or the other way.
The 64-bit argument passing protocol is completely different. In 64-bit
mode the first six arguments are passed in registers, etc., etc.
If you wish to run the program in 64-bit mode, the assembly language
functions must be rewritten. This all described in the abi available at
http://www.x86-64.org/documentation.html I have just completed an
introductory book on the topic, which I hope to find a publisher for
soon.
Bob Plantz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Assembler messages
@ 2010-10-25 8:36 kevin631012
0 siblings, 0 replies; 4+ messages in thread
From: kevin631012 @ 2010-10-25 8:36 UTC (permalink / raw)
To: gcc-help
Hi All ,
I build temporary gcc and glib on my own board ( SH4 RISC ) . and now I try to replace temporary gcc but I got an error as following
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.4/gcc -I../../gcc-4.2.4/gcc/. -I../../gcc-4.2.4/gcc/../include -I../../gcc-4.2.4/gcc/../libcpp/include -I../../gcc-4.2.4/gcc/../libdecnumber -I../libdecnumber insn-recog.c -o insn-recog.o
/tmp/cc5zlcDn.s: Assembler messages:
/tmp/cc5zlcDn.s:52763: Error: displacement to defined symbol .L8687 overflows 12-bit field
basicly , many things I can do . I can build glib and binutility but few unexpected bin-utility test result . Can anyone tell me is this error related to unexpected bin-utility test result or some where else related to gcc it-self ?
Thanks
Kevin ...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-24 13:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 10:55 Assembler messages cristi marius
2009-01-28 12:30 ` John (Eljay) Love-Jensen
2009-01-30 0:57 ` Bob Plantz
2010-10-25 8:36 kevin631012
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).