Declare register names as static constants rather than external globals.
Review URL: http://codereview.chromium.org/119082 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ba09fb12aa
commit
2852f8d5e2
@ -43,29 +43,6 @@
|
|||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// Implementation of Register
|
|
||||||
|
|
||||||
Register eax = { 0 };
|
|
||||||
Register ecx = { 1 };
|
|
||||||
Register edx = { 2 };
|
|
||||||
Register ebx = { 3 };
|
|
||||||
Register esp = { 4 };
|
|
||||||
Register ebp = { 5 };
|
|
||||||
Register esi = { 6 };
|
|
||||||
Register edi = { 7 };
|
|
||||||
Register no_reg = { -1 };
|
|
||||||
|
|
||||||
XMMRegister xmm0 = { 0 };
|
|
||||||
XMMRegister xmm1 = { 1 };
|
|
||||||
XMMRegister xmm2 = { 2 };
|
|
||||||
XMMRegister xmm3 = { 3 };
|
|
||||||
XMMRegister xmm4 = { 4 };
|
|
||||||
XMMRegister xmm5 = { 5 };
|
|
||||||
XMMRegister xmm6 = { 6 };
|
|
||||||
XMMRegister xmm7 = { 7 };
|
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Implementation of CpuFeatures
|
// Implementation of CpuFeatures
|
||||||
|
|
||||||
|
@ -79,15 +79,15 @@ struct Register {
|
|||||||
int code_;
|
int code_;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Register eax;
|
const Register eax = {0};
|
||||||
extern Register ecx;
|
const Register ecx = { 1 };
|
||||||
extern Register edx;
|
const Register edx = { 2 };
|
||||||
extern Register ebx;
|
const Register ebx = { 3 };
|
||||||
extern Register esp;
|
const Register esp = { 4 };
|
||||||
extern Register ebp;
|
const Register ebp = { 5 };
|
||||||
extern Register esi;
|
const Register esi = { 6 };
|
||||||
extern Register edi;
|
const Register edi = { 7 };
|
||||||
extern Register no_reg;
|
const Register no_reg = { -1 };
|
||||||
|
|
||||||
|
|
||||||
struct XMMRegister {
|
struct XMMRegister {
|
||||||
@ -100,14 +100,14 @@ struct XMMRegister {
|
|||||||
int code_;
|
int code_;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern XMMRegister xmm0;
|
const XMMRegister xmm0 = { 0 };
|
||||||
extern XMMRegister xmm1;
|
const XMMRegister xmm1 = { 1 };
|
||||||
extern XMMRegister xmm2;
|
const XMMRegister xmm2 = { 2 };
|
||||||
extern XMMRegister xmm3;
|
const XMMRegister xmm3 = { 3 };
|
||||||
extern XMMRegister xmm4;
|
const XMMRegister xmm4 = { 4 };
|
||||||
extern XMMRegister xmm5;
|
const XMMRegister xmm5 = { 5 };
|
||||||
extern XMMRegister xmm6;
|
const XMMRegister xmm6 = { 6 };
|
||||||
extern XMMRegister xmm7;
|
const XMMRegister xmm7 = { 7 };
|
||||||
|
|
||||||
enum Condition {
|
enum Condition {
|
||||||
// any value < 0 is considered no_condition
|
// any value < 0 is considered no_condition
|
||||||
|
Loading…
Reference in New Issue
Block a user