diff options
author | Venkatraman Govindaraju <venkatra@cs.wisc.edu> | 2013-09-22 09:54:42 +0000 |
---|---|---|
committer | Venkatraman Govindaraju <venkatra@cs.wisc.edu> | 2013-09-22 09:54:42 +0000 |
commit | 0821c72f11659964f76f4326874dd4037900ce14 (patch) | |
tree | 91639da5c53e31d244815382c39cdd1ad8573f2f /lib/Target/Sparc/SparcInstrFormats.td | |
parent | 69ae8f1abda2cfcbbb2ef895bbe23936d1beddf8 (diff) | |
download | llvm-0821c72f11659964f76f4326874dd4037900ce14.tar.gz llvm-0821c72f11659964f76f4326874dd4037900ce14.tar.bz2 llvm-0821c72f11659964f76f4326874dd4037900ce14.tar.xz |
[Sparc] Make SPARC instructions' encoding well defined such that TableGen can automatically generate code emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcInstrFormats.td')
-rw-r--r-- | lib/Target/Sparc/SparcInstrFormats.td | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcInstrFormats.td b/lib/Target/Sparc/SparcInstrFormats.td index c270ffeff9..afa287415d 100644 --- a/lib/Target/Sparc/SparcInstrFormats.td +++ b/lib/Target/Sparc/SparcInstrFormats.td @@ -111,6 +111,32 @@ class F3_3<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, let Inst{4-0} = rs2; } +// floating-point unary operations. +class F3_3u<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, + string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + bits<5> rs2; + + let op = opVal; + let op3 = op3val; + let rs1 = 0; + + let Inst{13-5} = opfval; // fp opcode + let Inst{4-0} = rs2; +} + +// floating-point compares. +class F3_3c<bits<2> opVal, bits<6> op3val, bits<9> opfval, dag outs, dag ins, + string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { + bits<5> rs2; + + let op = opVal; + let op3 = op3val; + let rd = 0; + + let Inst{13-5} = opfval; // fp opcode + let Inst{4-0} = rs2; +} + // Shift by register rs2. class F3_Sr<bits<2> opVal, bits<6> op3val, bit xVal, dag outs, dag ins, string asmstr, list<dag> pattern> : F3<outs, ins, asmstr, pattern> { |