Commit b0430fb6 authored by oliver@apple.com's avatar oliver@apple.com

fourthTier: DFG should better abstract arguments

https://bugs.webkit.org/show_bug.cgi?id=114073

Reviewed by Mark Hahnenberg.

* dfg/DFGGPRInfo.h:
(GPRInfo):
(JSC::DFG::GPRInfo::toArgumentRegister):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 02b179b1
2013-04-05 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should better abstract arguments
https://bugs.webkit.org/show_bug.cgi?id=114073
Reviewed by Mark Hahnenberg.
* dfg/DFGGPRInfo.h:
(GPRInfo):
(JSC::DFG::GPRInfo::toArgumentRegister):
2013-07-15 Oliver Hunt <oliver@apple.com>
Merged dfgFourthTier r147609
......
......@@ -259,6 +259,7 @@ class GPRInfo {
public:
typedef GPRReg RegisterType;
static const unsigned numberOfRegisters = 5;
static const unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
// Temporary registers.
static const GPRReg regT0 = X86Registers::eax;
......@@ -321,6 +322,7 @@ class GPRInfo {
public:
typedef GPRReg RegisterType;
static const unsigned numberOfRegisters = 9;
static const unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
// These registers match the baseline JIT.
static const GPRReg cachedResultRegister = X86Registers::eax;
......@@ -357,6 +359,13 @@ public:
static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5, regT6, regT7, regT8 };
return registerForIndex[index];
}
static GPRReg toArgumentRegister(unsigned index)
{
ASSERT(index < numberOfArgumentRegisters);
static const GPRReg registerForIndex[numberOfArgumentRegisters] = { argumentGPR0, argumentGPR1, argumentGPR2, argumentGPR3, argumentGPR4, argumentGPR5 };
return registerForIndex[index];
}
static unsigned toIndex(GPRReg reg)
{
......@@ -394,6 +403,7 @@ class GPRInfo {
public:
typedef GPRReg RegisterType;
static const unsigned numberOfRegisters = 8;
static const unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
// Temporary registers.
static const GPRReg regT0 = ARMRegisters::r0;
......@@ -467,6 +477,7 @@ class GPRInfo {
public:
typedef GPRReg RegisterType;
static const unsigned numberOfRegisters = 6;
static const unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
// Temporary registers.
static const GPRReg regT0 = MIPSRegisters::v0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment