OSDN Git Service

Mips specific inline asm operand modifier 'M':
authorJack Carter <jcarter@mips.com>
Wed, 18 Jul 2012 06:41:36 +0000 (06:41 +0000)
committerJack Carter <jcarter@mips.com>
Wed, 18 Jul 2012 06:41:36 +0000 (06:41 +0000)
commita0f14afee16ca976fef79c64df9a678e7f26cf43
treed3f69bf747d816c675753a269d042c537d894d9e
parent18a1b616ea123548b61a037c4f4fea4133aac1b5
Mips specific inline asm operand modifier 'M':

Print the high order register of a double word register operand.

In 32 bit mode, a 64 bit double word integer will be represented
by 2 32 bit registers. This modifier causes the high order register
to be used in the asm expression. It is useful if you are using
doubles in assembler and continue to control register to variable
relationships.

This patch also fixes a related bug in a previous patch:

    case 'D': // Second part of a double word register operand
    case 'L': // Low order register of a double word register operand
    case 'M': // High order register of a double word register operand

I got 'D' and 'M' confused. The second part of a double word operand
will only match 'M' for one of the endianesses. I had 'L' and 'D'
be the opposite twins when 'L' and 'M' are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160429 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsAsmPrinter.cpp
test/CodeGen/Mips/inlineasm-operand-code.ll