Skip to content

Instruction description mismatch #360

@AFOliveira

Description

@AFOliveira

Is your feature request related to a problem? Please describe.
While working on #356, I encountered the following issue with the FENCE instruction.

riscv-opcodes describes FENCE as fence fm pred succ rs1 14..12=0 rd 6..2=0x03 1..0=3
LLVM describes FENCE as 0000pred[3]pred[2]pred[1]pred[0]succ[3]succ[2]succ[1]succ[0]00000000000000001111

The difference here is that LLVM hardcodes FM as 0000. I believe the reason this happens is because the ISA states the following:

image

The problem is that FENCE.TSO is a pseudo instruction of FENCE, therefore I'm not sure we can use LLVM definition here. Is this a difference on how compilers and hardware see the same instrucion?

Describe the solution you'd like
Would it be beneficialif we define a field that differentiates the instructions from software and hardware POV?

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions