riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
74 stars 42 forks source link

New compiler options, -mbig-endian and -mlittle-endian, used to choose the endian. #15

Open Nelson1225 opened 3 years ago

Nelson1225 commented 3 years ago

Hi Guys,

We get the GNU binutils patches from Marcus Comstedt recently, to support RISCV big endian targets [1]. In the patches, we need to add new assembler options, -mbig-endian and -mlittle-endian, to choose the endian in assembler. I have raised another issue to discuss the new target triplet in the psabi, https://github.com/riscv/riscv-elf-psabi-doc/issues/167. Once we all agree with these changes, we will need to add the new assembler options, -mbig-endian and -mlittle-endian, into the c-api-doc, too.

Thanks Nelson

[1] https://sourceware.org/pipermail/binutils/2020-December/114632.html

nick-knight commented 3 years ago

Hi @Nelson1225 , thanks for following up on this.

Are assembler command-line options really part of the "C API"? I think this might belong over at https://github.com/riscv/riscv-toolchain-conventions ("This effort aims to document the expected behaviour and command-line interface of RISC-V toolchains.")

Nelson1225 commented 3 years ago

Oh thanks for pointing this out, @knightsifive. I see the description, and we should add the options to the binutils doc directly, if the patches are accepted. I will open a new issue to riscv-toolchain-conventions and close this one.

Nelson1225 commented 3 years ago

Reopen it since we also need the compiler options. Kito had reminded me before that the following link, https://github.com/riscv/riscv-isa-sim/pull/575

jim-wilson commented 3 years ago

I am in favor of accepting these new compiler options.

ebahapo commented 3 years ago

I second this proposal.