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

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

Issue 11745030: ARM: generate integer zero in a uniform manner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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
« no previous file with comments | « src/arm/stub-cache-arm.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::NONE32)); 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::NONE32)); 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::NONE32)); 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 __ adc(r1, r1, Operand(r1), LeaveCC, cs); 972 __ adc(r1, r1, Operand(r1), LeaveCC, cs);
973 __ str(r1, MemOperand(r0, OFFSET_OF(I, a))); 973 __ str(r1, MemOperand(r0, OFFSET_OF(I, a)));
974 974
975 __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b))); 975 __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b)));
976 __ mov(r2, Operand(r2, ASR, 1), SetCC); 976 __ mov(r2, Operand(r2, ASR, 1), SetCC);
977 __ adc(r2, r2, Operand(r2), LeaveCC, cs); 977 __ adc(r2, r2, Operand(r2), LeaveCC, cs);
978 __ str(r2, MemOperand(r0, OFFSET_OF(I, b))); 978 __ str(r2, MemOperand(r0, OFFSET_OF(I, b)));
979 979
980 // Test corner cases. 980 // Test corner cases.
981 __ mov(r1, Operand(0xffffffff)); 981 __ mov(r1, Operand(0xffffffff));
982 __ mov(r2, Operand(0)); 982 __ mov(r2, Operand::Zero());
983 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry. 983 __ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry.
984 __ adc(r3, r1, Operand(r2)); 984 __ adc(r3, r1, Operand(r2));
985 __ str(r3, MemOperand(r0, OFFSET_OF(I, c))); 985 __ str(r3, MemOperand(r0, OFFSET_OF(I, c)));
986 986
987 __ mov(r1, Operand(0xffffffff)); 987 __ mov(r1, Operand(0xffffffff));
988 __ mov(r2, Operand(0)); 988 __ mov(r2, Operand::Zero());
989 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. 989 __ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry.
990 __ adc(r3, r1, Operand(r2)); 990 __ adc(r3, r1, Operand(r2));
991 __ str(r3, MemOperand(r0, OFFSET_OF(I, d))); 991 __ str(r3, MemOperand(r0, OFFSET_OF(I, d)));
992 992
993 __ mov(pc, Operand(lr)); 993 __ mov(pc, Operand(lr));
994 994
995 CodeDesc desc; 995 CodeDesc desc;
996 assm.GetCode(&desc); 996 assm.GetCode(&desc);
997 Object* code = HEAP->CreateCode( 997 Object* code = HEAP->CreateCode(
998 desc, 998 desc,
(...skipping 21 matching lines...) Expand all
1020 Assembler assm(Isolate::Current(), NULL, 0); 1020 Assembler assm(Isolate::Current(), NULL, 0);
1021 1021
1022 Label target; 1022 Label target;
1023 __ b(eq, &target); 1023 __ b(eq, &target);
1024 __ b(ne, &target); 1024 __ b(ne, &target);
1025 __ bind(&target); 1025 __ bind(&target);
1026 __ nop(); 1026 __ nop();
1027 } 1027 }
1028 1028
1029 #undef __ 1029 #undef __
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698