Commit 59914900 authored by baptiste.afsa@arm.com's avatar baptiste.afsa@arm.com

A64: Tidy up a few TODOs.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/195363003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6f1adba2
...@@ -846,9 +846,6 @@ class Assembler : public AssemblerBase { ...@@ -846,9 +846,6 @@ class Assembler : public AssemblerBase {
return SizeOfCodeGeneratedSince(label) / kInstructionSize; return SizeOfCodeGeneratedSince(label) / kInstructionSize;
} }
// TODO(all): Initialize these constants related with code patching.
// TODO(all): Set to -1 to hopefully crash if mistakenly used.
// Number of instructions generated for the return sequence in // Number of instructions generated for the return sequence in
// FullCodeGenerator::EmitReturnSequence. // FullCodeGenerator::EmitReturnSequence.
static const int kJSRetSequenceInstructions = 7; static const int kJSRetSequenceInstructions = 7;
......
...@@ -1758,11 +1758,13 @@ void MacroAssembler::GetBuiltinFunction(Register target, ...@@ -1758,11 +1758,13 @@ void MacroAssembler::GetBuiltinFunction(Register target,
} }
void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { void MacroAssembler::GetBuiltinEntry(Register target,
ASSERT(!target.is(x1)); Register function,
GetBuiltinFunction(x1, id); Builtins::JavaScript id) {
ASSERT(!AreAliased(target, function));
GetBuiltinFunction(function, id);
// Load the code entry point from the builtins object. // Load the code entry point from the builtins object.
Ldr(target, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); Ldr(target, FieldMemOperand(function, JSFunction::kCodeEntryOffset));
} }
...@@ -1773,7 +1775,8 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, ...@@ -1773,7 +1775,8 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
// You can't call a builtin without a valid frame. // You can't call a builtin without a valid frame.
ASSERT(flag == JUMP_FUNCTION || has_frame()); ASSERT(flag == JUMP_FUNCTION || has_frame());
GetBuiltinEntry(x2, id); // Get the builtin entry in x2 and setup the function object in x1.
GetBuiltinEntry(x2, x1, id);
if (flag == CALL_FUNCTION) { if (flag == CALL_FUNCTION) {
call_wrapper.BeforeCall(CallSize(x2)); call_wrapper.BeforeCall(CallSize(x2));
Call(x2); Call(x2);
......
...@@ -1047,7 +1047,6 @@ class MacroAssembler : public Assembler { ...@@ -1047,7 +1047,6 @@ class MacroAssembler : public Assembler {
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
} }
// TODO(all): Why does this variant save FP regs unconditionally?
void CallRuntimeSaveDoubles(Runtime::FunctionId id) { void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id); const Runtime::Function* function = Runtime::FunctionForId(id);
CallRuntime(function, function->nargs, kSaveFPRegs); CallRuntime(function, function->nargs, kSaveFPRegs);
...@@ -1110,9 +1109,10 @@ class MacroAssembler : public Assembler { ...@@ -1110,9 +1109,10 @@ class MacroAssembler : public Assembler {
const CallWrapper& call_wrapper = NullCallWrapper()); const CallWrapper& call_wrapper = NullCallWrapper());
// Store the code object for the given builtin in the target register and // Store the code object for the given builtin in the target register and
// setup the function in x1. // setup the function in the function register.
// TODO(all): Can we use another register than x1? void GetBuiltinEntry(Register target,
void GetBuiltinEntry(Register target, Builtins::JavaScript id); Register function,
Builtins::JavaScript id);
// Store the function for the given builtin in the target register. // Store the function for the given builtin in the target register.
void GetBuiltinFunction(Register target, Builtins::JavaScript id); void GetBuiltinFunction(Register target, Builtins::JavaScript id);
......
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