mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 00:37:42 +00:00
Cross-platform cleanup in preparation of better ARM code for indexed load/store.
R=srdjan@google.com Review URL: https://codereview.chromium.org//286903015 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36454 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
b4b4889406
commit
e5974daed3
|
@ -450,14 +450,14 @@ class FlowGraphCompiler : public ValueObject {
|
|||
// Array/list element address computations.
|
||||
static intptr_t DataOffsetFor(intptr_t cid);
|
||||
static intptr_t ElementSizeFor(intptr_t cid);
|
||||
static FieldAddress ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t offset);
|
||||
static FieldAddress ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index);
|
||||
static Address ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t offset);
|
||||
static Address ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index);
|
||||
static Address ExternalElementAddressForIntIndex(intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t offset);
|
||||
|
|
|
@ -1534,22 +1534,20 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
|
|||
}
|
||||
|
||||
|
||||
// Do not implement or use this function.
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
||||
|
||||
// Do not implement or use this function.
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
UNREACHABLE(); // No register indexed with offset addressing mode on ARM.
|
||||
Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
||||
|
|
|
@ -1527,22 +1527,20 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
|
|||
}
|
||||
|
||||
|
||||
// Do not implement or use this function.
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
||||
|
||||
// Do not implement or use this function.
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
UNREACHABLE(); // No register indexed with offset addressing mode on ARM.
|
||||
Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
||||
|
|
|
@ -1539,10 +1539,10 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
|
|||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
const int64_t disp =
|
||||
static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
|
||||
ASSERT(Utils::IsInt(32, disp));
|
||||
|
@ -1568,10 +1568,10 @@ static ScaleFactor ToScaleFactor(intptr_t index_scale) {
|
|||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
return FieldAddress(array,
|
||||
index,
|
||||
ToScaleFactor(index_scale),
|
||||
|
|
|
@ -1597,19 +1597,19 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
|
|||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
UNREACHABLE();
|
||||
return FieldAddress(array, index);
|
||||
}
|
||||
|
|
|
@ -1575,10 +1575,10 @@ void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
|
|||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
intptr_t index) {
|
||||
const int64_t disp =
|
||||
static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
|
||||
ASSERT(Utils::IsInt(32, disp));
|
||||
|
@ -1604,10 +1604,10 @@ static ScaleFactor ToScaleFactor(intptr_t index_scale) {
|
|||
}
|
||||
|
||||
|
||||
FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
||||
intptr_t index_scale,
|
||||
Register array,
|
||||
Register index) {
|
||||
return FieldAddress(array,
|
||||
index,
|
||||
ToScaleFactor(index_scale),
|
||||
|
|
Loading…
Reference in a new issue