FAST-Research-Group / primate

Parent project for the Primate architecture
2 stars 0 forks source link

Branch offsets #8

Open kayvan61 opened 1 month ago

kayvan61 commented 1 month ago

branch type is determined pre packetization. Packetization then pushes the instruction too far for the 13 bit imm that the branch supports. Moving the branch offsets to use instruction offset instead of byte offset should fix.

Files to look at: arch-gen: llvm/lib/Target/Primate/MCTargetDesc/PrimateAsmBackend.cpp

kayvan61 commented 1 month ago

It's reasonable to branch a single VLIW instruction. Since instruction memory is addressable by the VLIW Instruction size, it's reasonable to jump 1 address.