Comments (4)
Newer versions of binutils support linker relaxation against the gp
register to reduce code size. It seems the compliance tests need to be issuing a sequence to initialize gp
, such as:
.option push
.option norelax
la gp, __global_pointer$
.option pop
An alternative solution is to use a linker script that avoids defining the __global_pointer$
symbol; then, the linker will not attempt to perform the gp
relaxation.
from riscv-arch-test.
Hi
Thank you for your reply! It doesn't work if I just add the code snippet to the _start, because the gp will be modified in different places. I have to add right before "la x10, test_A4_data + 2048".
Therefore, I just simply add '-mno-relax' to the linker flags to disable it. The assembly codes are same as those generated by the old version compiler (7.1.0).
On the other hands, if writing c program (not pseudo-instruction), is it just adding the gp initialization in _start? Does the compiler take care of the gp?
Jason
from riscv-arch-test.
In the normal use case, the C library's implementation of _start is responsible for initializing gp.
from riscv-arch-test.
Thank you!
from riscv-arch-test.
Related Issues (20)
- The predefined identify map isn't an identity map HOT 1
- Handling Exceptions from MMode with MPRV=1
- No file named model_test.h HOT 1
- Skip Zmmul tests if misa.M is RW and cleared
- What should I do first when using this? HOT 3
- FP floating point corner case isn't tested HOT 1
- Trap Handler Issue in S Mode with Virtualization Enabled HOT 3
- e7d4b281 & bf5ca309 in the ref's signature HOT 2
- RVTEST_ISA for privileged spec 1.12 HOT 4
- mtrap_sigptr issue HOT 2
- How to generate tests for RV64D and RV64F using riscv-ctg? HOT 5
- privilege spec 1.11 (2019) is generating mstatush CSR in trap handler which is not defined in that version. HOT 3
- Need to check minsret for all tests that have deterministic# of instructioni
- Hypervisor Extension enable issue HOT 5
- Compiling Zca tests HOT 5
- Wrong satp setup in arch_test.h HOT 7
- Should cgfs be checked in instead of generated tests HOT 8
- Continued missing coverage for x0/non-x0 on registers (when all registers are the same)
- Atomic Test cases for amominu (and potentially others) Sail is not generating the correect signature HOT 1
- RVMODEL_IO_ASSERT_GPR_RQ used for float point registers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riscv-arch-test.