[LLVMdev] Suspicious code for X86 target

Maarten ter Huurne maarten at treewalker.org
Mon Aug 13 15:44:19 PDT 2007


Hi,

I found some suspicious code in 
X86TargetLowering::getRegClassForInlineAsmConstraint, but I don't know if 
it's a bug or my poor understanding of what the code does.

This is the code in question:
(lib/Target/X86/X86ISelLowering.cpp:5064)

 if (VT == MVT::i32)
   return make_vector<unsigned>(X86::EAX, X86::EDX, X86::ECX, X86::EBX, 0);
 else if (VT == MVT::i16)
   return make_vector<unsigned>(X86::AX, X86::DX, X86::CX, X86::BX, 0);
 else if (VT == MVT::i8)
   return make_vector<unsigned>(X86::AL, X86::DL, X86::CL, X86::DL, 0);

In the last vector, I would expect the last DL to be BL instead.

Bye,
		Maarten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070814/632e17d4/attachment.sig>


More information about the llvm-dev mailing list