From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bdbaf88f91f26e7c,start X-Google-Attributes: gidfee84,public From: M.D.Poole@ukc.ac.uk (mdp2) Subject: Incompatibilities between DEC/GNU assemblers Date: 1995/09/27 Message-ID: <64@mint.ukc.ac.uk>#1/1 X-Deja-AN: 110856829 distribution: w sender: M.D.Poole@ukc.ac.uk organization: University of Kent at Canterbury, UK. newsgroups: comp.unix.osf.osf1 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