* Incompatibilities between DEC/GNU assemblers
@ 1995-09-27 4:00 mdp2
0 siblings, 0 replies; only message in thread
From: mdp2 @ 1995-09-27 4:00 UTC (permalink / raw)
I have a couple of problems with assemblers on a DEC Alpha workstation
running OSF/1. Can anyone help me on either of these?
I am using assembly language as a final intermediate language in a
compiler for the parallel language occam, and would like if possible
to generate assembly code that would be equally acceptable to the
DEC and GNU assemblers.
My problems are these:
1) The GNU assembler accepts instructions such as
bsr $6,.+4 # save program counter
br $31,.+12 # skip two instructions
which the DEC assembler does not like:
"stmt extends past logical end"
is there a way to get the same effect with the DEC assembler, without
laboriously generating labels for the assembler to throw away again?
2) The DEC assembler can realign instructions on qword
boundaries after a .byte directive with an odd number of bytes
br $2,1f # skip embedded data
.byte 0x30, 0x31, 0x32
.align 3
1f:
ldq_u $1,0($2) # address embedded data
the GNU assembler objects that the alignment requires a number of
bytes that is not a multiple of 4
"Error: alignment padding (1 bytes) not a multiple of 4"
I apologise for not giving any information about the version of the
assemblers that I am using - can anyone tell me how to find out
version number information from either of these assemblers which I did
not personally install on the machine.
Please do not tell me to redesign my compiler not to require these
constructions. I know I could do this, but would much prefer not to.
If anyone with responsibility for maintenance of either of these assemblers
should read this, perhaps they could advise users of any plans to
harmonise them with particular reference to these points, and the
differences between the ways the two assemblers handle the comment
introducers '!' and '#', which also gave me problems until I found a
way to write comments acceptable to both, which is:
Always use '!' in column 1, always use '#' elsewhere.
--
Michael Poole, Research Fellow, Computing Laboratory, University of Kent,
Canterbury, Kent, CT2 7NF, England Tel:01227 827553
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-09-27 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-09-27 4:00 Incompatibilities between DEC/GNU assemblers mdp2
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox