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

Side by Side Diff: test/cctest/test-assembler-arm.cc

Issue 11191029: Use VLDR instead of VMOVs from GPR when a 64-bit double can't be encoded as a VMOV immediate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« src/arm/assembler-arm.cc ('K') | « src/ic.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 83
84 TEST(1) { 84 TEST(1) {
85 InitializeVM(); 85 InitializeVM();
86 v8::HandleScope scope; 86 v8::HandleScope scope;
87 87
88 Assembler assm(Isolate::Current(), NULL, 0); 88 Assembler assm(Isolate::Current(), NULL, 0);
89 Label L, C; 89 Label L, C;
90 90
91 __ mov(r1, Operand(r0)); 91 __ mov(r1, Operand(r0));
92 __ mov(r0, Operand(0, RelocInfo::NONE)); 92 __ mov(r0, Operand::Zero());
93 __ b(&C); 93 __ b(&C);
94 94
95 __ bind(&L); 95 __ bind(&L);
96 __ add(r0, r0, Operand(r1)); 96 __ add(r0, r0, Operand(r1));
97 __ sub(r1, r1, Operand(1)); 97 __ sub(r1, r1, Operand(1));
98 98
99 __ bind(&C); 99 __ bind(&C);
100 __ teq(r1, Operand(0, RelocInfo::NONE)); 100 __ teq(r1, Operand::Zero());
101 __ b(ne, &L); 101 __ b(ne, &L);
102 __ mov(pc, Operand(lr)); 102 __ mov(pc, Operand(lr));
103 103
104 CodeDesc desc; 104 CodeDesc desc;
105 assm.GetCode(&desc); 105 assm.GetCode(&desc);
106 Object* code = HEAP->CreateCode( 106 Object* code = HEAP->CreateCode(
107 desc, 107 desc,
108 Code::ComputeFlags(Code::STUB), 108 Code::ComputeFlags(Code::STUB),
109 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); 109 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked();
110 CHECK(code->IsCode()); 110 CHECK(code->IsCode());
(...skipping 16 matching lines...) Expand all
127 127
128 __ mov(r1, Operand(r0)); 128 __ mov(r1, Operand(r0));
129 __ mov(r0, Operand(1)); 129 __ mov(r0, Operand(1));
130 __ b(&C); 130 __ b(&C);
131 131
132 __ bind(&L); 132 __ bind(&L);
133 __ mul(r0, r1, r0); 133 __ mul(r0, r1, r0);
134 __ sub(r1, r1, Operand(1)); 134 __ sub(r1, r1, Operand(1));
135 135
136 __ bind(&C); 136 __ bind(&C);
137 __ teq(r1, Operand(0, RelocInfo::NONE)); 137 __ teq(r1, Operand::Zero());
138 __ b(ne, &L); 138 __ b(ne, &L);
139 __ mov(pc, Operand(lr)); 139 __ mov(pc, Operand(lr));
140 140
141 // some relocated stuff here, not executed 141 // some relocated stuff here, not executed
142 __ RecordComment("dead code, just testing relocations"); 142 __ RecordComment("dead code, just testing relocations");
143 __ mov(r0, Operand(FACTORY->true_value())); 143 __ mov(r0, Operand(FACTORY->true_value()));
144 __ RecordComment("dead code, just testing immediate operands"); 144 __ RecordComment("dead code, just testing immediate operands");
145 __ mov(r0, Operand(-1)); 145 __ mov(r0, Operand(-1));
146 __ mov(r0, Operand(0xFF000000)); 146 __ mov(r0, Operand(0xFF000000));
147 __ mov(r0, Operand(0xF0F0F0F0)); 147 __ mov(r0, Operand(0xF0F0F0F0));
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 __ adc(r1, r1, Operand(r1), LeaveCC, cs); 970 __ adc(r1, r1, Operand(r1), LeaveCC, cs);
971 __ str(r1, MemOperand(r0, OFFSET_OF(I, a))); 971 __ str(r1, MemOperand(r0, OFFSET_OF(I, a)));
972 972
973 __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b))); 973 __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b)));
974 __ mov(r2, Operand(r2, ASR, 1), SetCC); 974 __ mov(r2, Operand(r2, ASR, 1), SetCC);
975 __ adc(r2, r2, Operand(r2), LeaveCC, cs); 975 __ adc(r2, r2, Operand(r2), LeaveCC, cs);
976 __ str(r2, MemOperand(r0, OFFSET_OF(I, b))); 976 __ str(r2, MemOperand(r0, OFFSET_OF(I, b)));
977 977
978 // Test corner cases. 978 // Test corner cases.
979 __ mov(r1, Operand(0xffffffff)); 979 __ mov(r1, Operand(0xffffffff));
980 __ mov(r2, Operand(0)); 980 __ mov(r2, Operand::Zero());
981 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry. 981 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry.
982 __ adc(r3, r1, Operand(r2)); 982 __ adc(r3, r1, Operand(r2));
983 __ str(r3, MemOperand(r0, OFFSET_OF(I, c))); 983 __ str(r3, MemOperand(r0, OFFSET_OF(I, c)));
984 984
985 __ mov(r1, Operand(0xffffffff)); 985 __ mov(r1, Operand(0xffffffff));
986 __ mov(r2, Operand(0)); 986 __ mov(r2, Operand::Zero());
987 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. 987 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry.
988 __ adc(r3, r1, Operand(r2)); 988 __ adc(r3, r1, Operand(r2));
989 __ str(r3, MemOperand(r0, OFFSET_OF(I, d))); 989 __ str(r3, MemOperand(r0, OFFSET_OF(I, d)));
990 990
991 __ mov(pc, Operand(lr)); 991 __ mov(pc, Operand(lr));
992 992
993 CodeDesc desc; 993 CodeDesc desc;
994 assm.GetCode(&desc); 994 assm.GetCode(&desc);
995 Object* code = HEAP->CreateCode( 995 Object* code = HEAP->CreateCode(
996 desc, 996 desc,
(...skipping 21 matching lines...) Expand all
1018 Assembler assm(Isolate::Current(), NULL, 0); 1018 Assembler assm(Isolate::Current(), NULL, 0);
1019 1019
1020 Label target; 1020 Label target;
1021 __ b(eq, &target); 1021 __ b(eq, &target);
1022 __ b(ne, &target); 1022 __ b(ne, &target);
1023 __ bind(&target); 1023 __ bind(&target);
1024 __ nop(); 1024 __ nop();
1025 } 1025 }
1026 1026
1027 #undef __ 1027 #undef __
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698