diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-13 18:37:06 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-13 18:37:06 +0000 |
| commit | 71144973f3954ee03ffc2623539a60df227fc106 (patch) | |
| tree | 00f6ad122098e911364b3c91133c3355725a9fa3 /llvm/lib | |
| parent | 258232fb805c9357a0fdf352e38bc7ab05ae3eaa (diff) | |
| download | bcm5719-llvm-71144973f3954ee03ffc2623539a60df227fc106.tar.gz bcm5719-llvm-71144973f3954ee03ffc2623539a60df227fc106.zip | |
Improve sext and zext of TLS variables.
llvm-svn: 66922
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.td | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index 64d002171a4..19703e9ce97 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -2947,6 +2947,24 @@ def TLS_ext16_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), SegGS; let AddedComplexity = 15 in +def TLS_sext16_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), + "movswl\t%gs:${src:mem}, $dst", + [(set GR32:$dst, + (sextloadi32i16 + (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + +let AddedComplexity = 15 in +def TLS_zext16_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), + "movzwl\t%gs:${src:mem}, $dst", + [(set GR32:$dst, + (zextloadi32i16 + (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + +let AddedComplexity = 15 in def TLS_ext8_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), "movzbl\t%gs:${src:mem}, $dst", [(set GR32:$dst, @@ -2955,6 +2973,24 @@ def TLS_ext8_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), (X86Wrapper tglobaltlsaddr:$src))))]>, SegGS; +let AddedComplexity = 15 in +def TLS_sext8_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), + "movsbl\t%gs:${src:mem}, $dst", + [(set GR32:$dst, + (sextloadi32i8 + (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + +let AddedComplexity = 15 in +def TLS_zext8_gs_ri : I<0x8B, Pseudo, (outs GR32:$dst), (ins i32imm:$src), + "movzbl\t%gs:${src:mem}, $dst", + [(set GR32:$dst, + (zextloadi32i8 + (add X86TLStp, + (X86Wrapper tglobaltlsaddr:$src))))]>, + SegGS; + def TLS_tp : I<0x8B, Pseudo, (outs GR32:$dst), (ins), "movl\t%gs:0, $dst", [(set GR32:$dst, X86TLStp)]>, SegGS; |

