ultraembedded / biriscv

32-bit Superscalar RISC-V CPU
Apache License 2.0
838 stars 146 forks source link

LWGP #16

Open altuSemi opened 2 years ago

altuSemi commented 2 years ago

Is LWGP supported by BIRISCV?

BIRISCV core is throwing the exception “0x02: Illegal Instruction” when it executes compiler/assembler generated instructions with GP suffix.

Here is firmware log where it detected the 0x02 exception: image In this case, when program counter reaches to the instruction ‘lwgp’: image The core raises the 0x02 exception:

image

It is to be noted that, the startup assembly file and the Makefile are configured correctly to define __global_pointer.

image image

The following flag disables the GP usage, but results in worse code density: image

Your advise is appreciated, thanks