Skip to content
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

add basic support for LoongArch #19505

Merged
merged 1 commit into from
Dec 16, 2021
Merged

add basic support for LoongArch #19505

merged 1 commit into from
Dec 16, 2021

Conversation

junchao-loongson
Copy link
Contributor

Checklist

  • Closing issues: #issue
  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the radare2book

Description

Hello friends, recently Loongson released the LoongArch architecture processor, this patch is used to support radare2 can be compiled properly on loongarch.、
I'll be submitting a patch to support binary file analysis for the loongarch platform later.

You can view detailed information about LoongArch at the link below
LoongArch-Documentation

@@ -121,6 +121,8 @@ R_API bool r_sys_tts(const char *txt, bool bg);
# endif
#elif __mips__
# define r_sys_breakpoint() __asm__ volatile ("break");
#elif __loongarch__
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would prefer to use #elif (mips || loongarch)

Copy link
Collaborator

@trufae trufae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! as long as loongson is mips i would prefer to group it as much as possible to the mips logic. are the new toolchains not handling them as mips

@junchao-loongson
Copy link
Contributor Author

thanks! as long as loongson is mips i would prefer to group it as much as possible to the mips logic. are the new toolchains not handling them as mips

loongarch is not mips, loongarch has new ABI and new Instruction set.
Therefore their toolchain cannot be shared either

@trufae trufae merged commit fb7778c into radareorg:master Dec 16, 2021
@trufae
Copy link
Collaborator

trufae commented Dec 16, 2021

Got it! do you have any link to learn more about this? Thank you!

@junchao-loongson
Copy link
Contributor Author

Got it! do you have any link to learn more about this? Thank you!

Of course, here is the English manual of loongarch
https://loongson.github.io/LoongArch-Documentation/README-EN.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants