Skip to content
  1. Jan 09, 2012
  2. Jan 03, 2012
  3. Jun 28, 2011
    • Jakob Stoklund Olesen's avatar
      Clean up the handling of the x87 fp stack to make it more robust. · 7297e7e2
      Jakob Stoklund Olesen authored
      Drop the FpMov instructions, use plain COPY instead.
      
      Drop the FpSET/GET instruction for accessing fixed stack positions.
      Instead use normal COPY to/from ST registers around inline assembly, and
      provide a single new FpPOP_RETVAL instruction that can access the return
      value(s) from a call. This is still necessary since you cannot tell from
      the CALL instruction alone if it returns anything on the FP stack. Teach
      fast isel to use this.
      
      This provides a much more robust way of handling fixed stack registers -
      we can tolerate arbitrary FP stack instructions inserted around calls
      and inline assembly. Live range splitting could sometimes break x87 code
      by inserting spill code in unfortunate places.
      
      As a bonus we handle floating point inline assembly correctly now.
      
      llvm-svn: 134018
      7297e7e2
  4. Feb 13, 2011
  5. Dec 23, 2010
  6. Nov 30, 2010
  7. Nov 06, 2010
    • Chris Lattner's avatar
      go to great lengths to work around a GAS bug my previous patch · ca7801e4
      Chris Lattner authored
      exposed:
      
      GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)"
      even though st(0) is implicit in all other fp stack instructions.
      
      Fortunately, there is an alias for fcomip named "fcompi" and gas does
      accept the default argument for the alias (boggle!).
      
      As such, switch the canonical form of this instruction to "pi" instead
      of "ip".  This makes the code generator and disassembler generate pi,
      avoiding the gas bug.
      
      llvm-svn: 118356
      ca7801e4
    • Chris Lattner's avatar
      change the fp comparison instructions to not have %st0 explicitly · 05031e7f
      Chris Lattner authored
      listed in its asm string, for consistency with the other similar
      instructions.
      
      llvm-svn: 118354
      05031e7f
  8. Oct 22, 2010
  9. Oct 21, 2010
  10. Oct 06, 2010
  11. Oct 05, 2010
  12. Sep 22, 2010
  13. Aug 26, 2010
  14. Jul 16, 2010
  15. Jul 11, 2010
  16. Jun 19, 2010
  17. May 03, 2010
  18. Mar 19, 2010
    • Chris Lattner's avatar
      Now that tblgen can handle matching implicit defs of instructions · 83facb08
      Chris Lattner authored
      to input patterns, we can fix X86ISD::CMP and X86ISD::BT as taking
      two inputs (which have to be the same type) and *returning an i32*.
      This is how the SDNodes get made in the graph, but we weren't able
      to model it this way due to deficiencies in the pattern language.
      
      Now we can change things like this:
      
       def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP,
      -                  [(X86cmp RFP80:$lhs, RFP80:$rhs),
      -                   (implicit EFLAGS)]>; // CC = ST(0) cmp ST(i)
      +                  [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>;
      
      and fix terrible crimes like this:
      
      -def : Pat<(parallel (X86cmp GR8:$src1, 0), (implicit EFLAGS)),
      +def : Pat<(X86cmp GR8:$src1, 0),
                 (TEST8rr GR8:$src1, GR8:$src1)>;
      
      This relies on matching the result of TEST8rr (which is EFLAGS, which is
      an implicit def) to the result of X86cmp, an i32.
      
      llvm-svn: 98903
      83facb08
  19. Mar 14, 2010
  20. Feb 28, 2010
  21. Feb 05, 2010
  22. Dec 18, 2009
    • Sean Callanan's avatar
      Instruction fixes, added instructions, and AsmString changes in the · 04d8cb74
      Sean Callanan authored
      X86 instruction tables.
      
      Also (while I was at it) cleaned up the X86 tables, removing tabs and
      80-line violations.
      
      This patch was reviewed by Chris Lattner, but please let me know if
      there are any problems.
      
      * X86*.td
      	Removed tabs and fixed 80-line violations
      
      * X86Instr64bit.td
      	(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
      		Added
      	(CALL, CMOV) Added qualifiers
      	(JMP) Added PC-relative jump instruction
      	(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
      		that it is 64-bit only (ambiguous since it has no
      		REX prefix)
      	(MOV) Added rr form going the other way, which is encoded
      		differently
      	(MOV) Changed immediates to offsets, which is more correct;
      		also fixed MOV64o64a to have to a 64-bit offset
      	(MOV) Fixed qualifiers
      	(MOV) Added debug-register and condition-register moves
      	(MOVZX) Added more forms
      	(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
      		(as with MOV) are encoded differently
      	(ROL) Made REX.W required
      	(BT) Uncommented mr form for disassembly only
      	(CVT__2__) Added several missing non-intrinsic forms
      	(LXADD, XCHG) Reordered operands to make more sense for
      		MRMSrcMem
      	(XCHG) Added register-to-register forms
      	(XADD, CMPXCHG, XCHG) Added non-locked forms
      * X86InstrSSE.td
      	(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
      		Added
      * X86InstrFPStack.td
      	(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
      	 FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
      	 FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
      	 FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
      	 FXRSTOR)
      		Added
      	(FCOM, FCOMP) Added qualifiers
      	(FSTENV, FSAVE, FSTSW) Fixed opcode names
      	(FNSTSW) Added implicit register operand
      * X86InstrInfo.td
      	(opaque512mem) Added for FXSAVE/FXRSTOR
      	(offset8, offset16, offset32, offset64) Added for MOV
      	(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
      	 LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
      	 LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
      	 LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
      	 CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
      	 SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
      	 VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
      	 VMWRITE, VMXOFF, VMXON) Added
      	(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
      	(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
      	 JGE, JLE, JG, JCXZ) Added 32-bit forms
      	(MOV) Changed some immediate forms to offset forms
      	(MOV) Added reversed reg-reg forms, which are encoded
      		differently
      	(MOV) Added debug-register and condition-register moves
      	(CMOV) Added qualifiers
      	(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
      	(BT) Uncommented memory-register forms for disassembler
      	(MOVSX, MOVZX) Added forms
      	(XCHG, LXADD) Made operand order make sense for MRMSrcMem
      	(XCHG) Added register-register forms
      	(XADD, CMPXCHG) Added unlocked forms
      * X86InstrMMX.td
      	(MMX_MOVD, MMV_MOVQ) Added forms
      * X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
      	change
      
      * X86RegisterInfo.td: Added debug and condition register sets
      * x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
      * peep-test-3.ll: Fixed testcase to reflect test qualifier
      * cmov.ll: Fixed testcase to reflect cmov qualifier
      * loop-blocks.ll: Fixed testcase to reflect call qualifier
      * x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
      * 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
        qualifier
      * x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
      * live-out-reg-info.ll: Fixed testcase to reflect test qualifier
      * tail-opts.ll: Fixed testcase to reflect call qualifiers
      * x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
      * bss-pagealigned.ll: Fixed testcase to reflect call qualifier
      * x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
      * widen_load-1.ll: Fixed testcase to reflect call qualifier
      
      llvm-svn: 91638
      04d8cb74
  23. Oct 29, 2009
  24. Sep 16, 2009
  25. Feb 10, 2009
  26. Dec 03, 2008
  27. Mar 26, 2008
  28. Mar 21, 2008
  29. Mar 10, 2008
  30. Mar 09, 2008
  31. Jan 29, 2008
    • Evan Cheng's avatar
      Work in progress. This patch *fixes* x86-64 calls which are modelled as... · 084a1cdc
      Evan Cheng authored
      Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
      Status: This only works for direct calls, and only the caller side is done. Disabled for now.
      
      llvm-svn: 46527
      084a1cdc
  32. Jan 11, 2008
  33. Jan 10, 2008
Loading