On Sun, 18 Aug 2013, Richard Haney wrote:
> Sorry about the last, attempted message being too large. I did not know
> that there was such a size limit. I am re-sending the last attempted
> message with the attachments removed. The relevant attachments were
> included with the original message with subject "Assembler instruction
> errors for push and pop during make". I would appreciate any help anyone
> can provide.
> At present I am trying to brush up on assembly & machine coding concepts
> and to study the differences between 32-bit and 64-bit processing.
> Hopefully, that will allow me to create a fix for the problem. One hope
> is that, for the assembly programs in question, it does not matter whether
> they are assembled as 32-bit code "as is" with only an explicit invocation
> of the gnu assembler and a --32 flag adjustment or as 64-bit code with code
> adjustments. But at present that is just wishful thinking.
I'm not familiar in detail with that flag, but I doubt that it would work.
There are instructions (and encodings of instructions) that are valid in
32-bit code and not in 64-bit code, plus, if the code is pushing things
onto the stack, you need to use 64-bit pushes (and 64-bit registers when
storing pointers) to interoperate with other 64-bit code.
Are you sure that the code is building with the right assembly file?
AMD64.asm looks to be using pushq, which is the right form to use for
64-bit code. I suspect that this is a configure issue (detecting your
architecture as IA-32 and not x86-64), not a problem in the assembly files
-- Jeremiah Willcock