OSDN Git Service

Lift register and condition code enums out into their own file.
authorJan Voung <jvoung@chromium.org>
Fri, 19 Sep 2014 01:18:10 +0000 (18:18 -0700)
committerJan Voung <jvoung@chromium.org>
Fri, 19 Sep 2014 01:18:10 +0000 (18:18 -0700)
commitbd385e4628d0b23ab54de230ca34bc30a3bb0db7
treef40fd817a9070d88f2e5ffe821426d5fba9ff51c
parent89906a5e53007c406a5dae46b58d2a9c205dfb5f
Lift register and condition code enums out into their own file.

Lift the enums out of IceInstX8632.h and IceTargetLoweringX8632.h.
This will later allow the assembler to share the enum values and
use them as encodings where appropriate. E.g., to avoid having a separate
enum in:
https://codereview.chromium.org/476323004/diff/680001/src/assembler_constants_ia32.h

The "all registers" enum is retained, but separate GPRRegister and
XmmRegister enums are created with tags "Encoded_Reg_foo" to represent
the encoded value of register "foo". Functions are added to convert
from the "all registers" namespace to the encoded ones.

Re-order the BrCond so that they match the encoding according to
the "Instruction Subcode" in B.1 of the Intel Manuals.

BUG=none
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/582113003
src/IceConditionCodesX8632.h [new file with mode: 0644]
src/IceInstX8632.cpp
src/IceInstX8632.def
src/IceInstX8632.h
src/IceRegistersX8632.h [new file with mode: 0644]
src/IceTargetLoweringX8632.cpp
src/IceTargetLoweringX8632.h