-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC compatability #16
Comments
Hi, lui t1,%hi(label) ;lui RG1,LH4 ;#Load Upper Address : Set t1 to upper 20-bit label's address |
@mvlamar, thats a pretty good suggestion. I got stuck thinking about how to make it work in any part of the assembler, but just supporting the most common cases should get it most of the way there. In the program I just compiled and looked through and |
Hi Benjamin,
|
Thanks for the example. I'll try to add the the psuedo-instructions you suggested. |
The added ones come directly from mvlamar's suggestion on #16 I added TokenTypes.HI and LO to make sure that they weren't intepretted as macros by the tokenizer.
This covers the remaining issues listed in #16.
Aside from some simple pseudo instructions, the only issue I am aware of is the |
.section was sometimes followed by a quoted section name so that is not accepted by rars. .sdata was also used which RARS now treats as just .data This made the main issue of moving code over the lack of a C standard library. I am unsure if multiple C files can be assembled together effectively. Not GCC, but progress towards #16
This isn't directly related, but I think gcc used .equ instead of .eqv |
I don't think that GCC outputs assembly using It seems that GCC handles both in a similar way. I'm not sure if they are exactly the same though. I'll look into it and if they are exactly the same, add it into RARS. |
Build test and publish with Github Actions
I would like for GCC generated assembly to be able to be directly compiled (with libc features replaced). A fair number of small features need to be added to make that possible.
.section .rodata
should not have no effect.data
at least.rodata
section.align n
in.text
n >= 4
n < 4
can just be made inton = 4
.type
add sp,sp, -32
lui a5, %hi(.LC0)
addi a0,a5,%lo(.LC0)
jr ra
The text was updated successfully, but these errors were encountered: