Chromium Code Reviews

Side by Side Diff: src/IceRegList.h

Issue 1419903002: Subzero: Refactor x86 register definitions to use the alias mechanism. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix assembler unit tests. Fix register names. Code review changes. Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceRegistersX8632.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //===- subzero/src/IceRegList.h - Register list macro defs -----*- C++ -*-===//
2 //
3 // The Subzero Code Generator
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the REGLIST*() macros used in the IceInst*.def files.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SUBZERO_SRC_ICEINSTREGLIST_H
15 #define SUBZERO_SRC_ICEINSTREGLIST_H
16
17 // REGLISTn is a family of macros that we use to define register aliasing. "n"
18 // indicates how many register aliases are being provided to the macro. It
19 // assumes the parameters are register names declared in the "ns"
20 // namespace/class, but with the common "Reg_" prefix removed for brevity.
21 #define REGLIST1(ns, r0) \
22 { ns::Reg_##r0 }
23 #define REGLIST2(ns, r0, r1) \
24 { ns::Reg_##r0, ns::Reg_##r1 }
25 #define REGLIST3(ns, r0, r1, r2) \
26 { ns::Reg_##r0, ns::Reg_##r1, ns::Reg_##r2 }
27 #define REGLIST4(ns, r0, r1, r2, r3) \
28 { ns::Reg_##r0, ns::Reg_##r1, ns::Reg_##r2, ns::Reg_##r3 }
29 #define REGLIST6(ns, r0, r1, r2, r3, r4, r5) \
30 { \
31 ns::Reg_##r0, ns::Reg_##r1, ns::Reg_##r2, ns::Reg_##r3, ns::Reg_##r4, \
32 ns::Reg_##r5 \
33 }
34
35 #endif // SUBZERO_SRC_ICEINSTREGLIST_H
OLDNEW
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceRegistersX8632.h » ('j') | no next file with comments »

Powered by Google App Engine