Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: test/cctest/test-macro-assembler-x64.cc

Issue 1229233002: Remove more uses of the deprecated EnumSet template class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-macro-assembler-x64.cc
diff --git a/test/cctest/test-macro-assembler-x64.cc b/test/cctest/test-macro-assembler-x64.cc
index 4ff8cba68b80626d08be80b8b868c5c6a6a527c0..4cc52a11e2e1b9c9d14509fcd45bd179ff83fed0 100644
--- a/test/cctest/test-macro-assembler-x64.cc
+++ b/test/cctest/test-macro-assembler-x64.cc
@@ -736,28 +736,27 @@ static void SmiAddTest(MacroAssembler* masm,
__ movl(rcx, Immediate(first));
__ Integer32ToSmi(rcx, rcx);
- i::SmiOperationExecutionMode mode;
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ i::SmiOperationConstraints constraints =
+ i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnOverflow;
__ incq(rax);
- __ SmiAddConstant(r9, rcx, Smi::FromInt(second), mode, exit);
+ __ SmiAddConstant(r9, rcx, Smi::FromInt(second), constraints, exit);
__ cmpq(r9, r8);
__ j(not_equal, exit);
__ incq(rax);
- __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), mode, exit);
+ __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), constraints, exit);
__ cmpq(rcx, r8);
__ j(not_equal, exit);
__ movl(rcx, Immediate(first));
__ Integer32ToSmi(rcx, rcx);
- mode.RemoveAll();
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_NO_OVERFLOW);
+ constraints = i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnNoOverflow;
Label done;
__ incq(rax);
- __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), mode, &done);
+ __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), constraints, &done);
__ jmp(exit);
__ bind(&done);
__ cmpq(rcx, r8);
@@ -799,14 +798,14 @@ static void SmiAddOverflowTest(MacroAssembler* masm,
__ j(not_equal, exit);
}
- i::SmiOperationExecutionMode mode;
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ i::SmiOperationConstraints constraints =
+ i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnOverflow;
__ movq(rcx, r11);
{
Label overflow_ok;
__ incq(rax);
- __ SmiAddConstant(r9, rcx, Smi::FromInt(y_min), mode, &overflow_ok);
+ __ SmiAddConstant(r9, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -817,7 +816,7 @@ static void SmiAddOverflowTest(MacroAssembler* masm,
{
Label overflow_ok;
__ incq(rax);
- __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_min), mode, &overflow_ok);
+ __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -853,7 +852,7 @@ static void SmiAddOverflowTest(MacroAssembler* masm,
{
Label overflow_ok;
__ incq(rax);
- __ SmiAddConstant(r9, rcx, Smi::FromInt(y_max), mode, &overflow_ok);
+ __ SmiAddConstant(r9, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -861,12 +860,11 @@ static void SmiAddOverflowTest(MacroAssembler* masm,
__ j(not_equal, exit);
}
- mode.RemoveAll();
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ constraints = i::SmiOperationConstraint::kBailoutOnOverflow;
{
Label overflow_ok;
__ incq(rax);
- __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_max), mode, &overflow_ok);
+ __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -952,28 +950,27 @@ static void SmiSubTest(MacroAssembler* masm,
__ cmpq(rcx, r8);
__ j(not_equal, exit);
- i::SmiOperationExecutionMode mode;
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ i::SmiOperationConstraints constraints =
+ i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnOverflow;
__ Move(rcx, Smi::FromInt(first));
__ incq(rax); // Test 4.
- __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), mode, exit);
+ __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), constraints, exit);
__ cmpq(rcx, r8);
__ j(not_equal, exit);
__ Move(rcx, Smi::FromInt(first));
__ incq(rax); // Test 5.
- __ SmiSubConstant(r9, rcx, Smi::FromInt(second), mode, exit);
+ __ SmiSubConstant(r9, rcx, Smi::FromInt(second), constraints, exit);
__ cmpq(r9, r8);
__ j(not_equal, exit);
- mode.RemoveAll();
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_NO_OVERFLOW);
+ constraints = i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnNoOverflow;
__ Move(rcx, Smi::FromInt(first));
Label done;
__ incq(rax); // Test 6.
- __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), mode, &done);
+ __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), constraints, &done);
__ jmp(exit);
__ bind(&done);
__ cmpq(rcx, r8);
@@ -1015,15 +1012,15 @@ static void SmiSubOverflowTest(MacroAssembler* masm,
__ j(not_equal, exit);
}
- i::SmiOperationExecutionMode mode;
- mode.Add(i::PRESERVE_SOURCE_REGISTER);
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ i::SmiOperationConstraints constraints =
+ i::SmiOperationConstraint::kPreserveSourceRegister |
+ i::SmiOperationConstraint::kBailoutOnOverflow;
__ movq(rcx, r11);
{
Label overflow_ok;
__ incq(rax);
- __ SmiSubConstant(r9, rcx, Smi::FromInt(y_min), mode, &overflow_ok);
+ __ SmiSubConstant(r9, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -1034,7 +1031,7 @@ static void SmiSubOverflowTest(MacroAssembler* masm,
{
Label overflow_ok;
__ incq(rax);
- __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_min), mode, &overflow_ok);
+ __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -1070,7 +1067,7 @@ static void SmiSubOverflowTest(MacroAssembler* masm,
{
Label overflow_ok;
__ incq(rax);
- __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), mode, &overflow_ok);
+ __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
@@ -1078,13 +1075,12 @@ static void SmiSubOverflowTest(MacroAssembler* masm,
__ j(not_equal, exit);
}
- mode.RemoveAll();
- mode.Add(i::BAILOUT_ON_OVERFLOW);
+ constraints = i::SmiOperationConstraint::kBailoutOnOverflow;
__ movq(rcx, r11);
{
Label overflow_ok;
__ incq(rax);
- __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), mode, &overflow_ok);
+ __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
__ jmp(exit);
__ bind(&overflow_ok);
__ incq(rax);
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698