|
| |
Originally posted by RadSil@Jan. 01 2003, 4:11 pm
1) AS chokes on MOV.L Rx, Ry but just mov Rx, Ry is okay. Are these equivalent?
|
I believe so. The SH architecture doesn't support anything but dword-sized reg-reg transfers, so a "mov.l" is redundant. Hitachi's own syntax is MOV Rm, Rn and GAS tries to support the vendor syntax as far as possible.
| |
2) I replaced .EXPORT with .global. Are these the same directive?
|
In newer binutils, .export is a HPPA-specific directive. In older binutils, .global and .export were synonyms.
| |
3) There is a directive reading something like
.SECTION SEGA_P, CODE, ALIGN=4
I replaced this with
.section .code
.align 4
What is section SEGA_P (or some sources, SEGA_C)?
|
Probably something they defined in their link scripts. As you probably know, you can define your own sections and direct the compiler/assembler/linker to put your data in those sections. This is needed for eg. overlays and to put code/data in the lower RAM region.
| |
4) And lastly, variables. There were some .RES.L / .RES.W pseudo-ops I replaced with .long and .word and .DATA.L and .DATA.W that I also replaced with .long and .word. This is where I'm afraid I might have broke something.
|
That should be OK. The .RES.n pseudo-ops reserved room for uninitialised data, but I'm not sure if there's a 1:1 replacement. The .data.size is identical to .byte, .short and .int/.long.
If there's large amounts of uninitialized data you should make sure it gets placed in the .bss section so it isn't included in the binary image.
| |
Is there any good sh-coff-as specific documentation out there? KPIT's GNUSH doesn't come with any. Thanks in advance!
|
The GNUSH distro should come with a "Using as" document, which is basically this... in one page. There's very little SH-specific about as, but you can find it under section 8, "Machine Dependent Features". You also shouldn't have any trouble finding old binutils documentation on the net to use as reference. |