[LLVMdev] Instructions with overlapping encodings that are disambiguated by field comparisons

Daniel Sanders Daniel.Sanders at imgtec.com
Tue May 13 04:47:25 PDT 2014


Hi,

I'm not sure how to handle some of the trickier instruction encodings in MIPS64r6. My problem is that some instructions determine the operation based on the relationship between two fields. For example, 'beqc $rs, $rt, offset' (branch if equal, no delay slot) and bovc (branch if addition would overflow, no delay slot) share the same major opcode and field layout. When the register number $rs is less than the register number $rt, it is a beqc instruction. When the register number $rs is greater or equal to the register number $rt, it is a bovc.

Unsurprisingly, defining both of these instructions in tablegen causes decoding conflicts. Are there any targets with similar encoding/decoding issues that I could look at?

Daniel Sanders
Leading Software Design Engineer, MIPS Processor IP
Imagination Technologies Limited
www.imgtec.com<http://www.imgtec.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140513/dd18c832/attachment.html>


More information about the llvm-dev mailing list