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

Side by Side Diff: test/cctest/test-macro-assembler-ia32.cc

Issue 188463003: Add MacroAssembler::Move(reg, immediate) on IA32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/ia32/macro-assembler-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 __ mov(ebx, Immediate(-1)); 115 __ mov(ebx, Immediate(-1));
116 __ Store(ebx, Operand(esp, 0 * kPointerSize), Representation::UInteger16()); 116 __ Store(ebx, Operand(esp, 0 * kPointerSize), Representation::UInteger16());
117 __ mov(ebx, Operand(esp, 0 * kPointerSize)); 117 __ mov(ebx, Operand(esp, 0 * kPointerSize));
118 __ mov(edx, Immediate(65535)); 118 __ mov(edx, Immediate(65535));
119 __ cmp(ebx, edx); 119 __ cmp(ebx, edx);
120 __ j(not_equal, &exit); 120 __ j(not_equal, &exit);
121 __ Load(edx, Operand(esp, 0 * kPointerSize), Representation::UInteger16()); 121 __ Load(edx, Operand(esp, 0 * kPointerSize), Representation::UInteger16());
122 __ cmp(ebx, edx); 122 __ cmp(ebx, edx);
123 __ j(not_equal, &exit); 123 __ j(not_equal, &exit);
124 124
125 // Test 5.
126 __ Move(edx, Immediate(0)); // Test Move()
127 __ cmp(edx, Immediate(0));
128 __ j(not_equal, &exit);
129 __ Move(ecx, Immediate(-1));
130 __ cmp(ecx, Immediate(-1));
131 __ j(not_equal, &exit);
132 __ Move(ebx, Immediate(0x77));
133 __ cmp(ebx, Immediate(0x77));
134 __ j(not_equal, &exit);
135
125 __ xor_(eax, eax); // Success. 136 __ xor_(eax, eax); // Success.
126 __ bind(&exit); 137 __ bind(&exit);
127 __ add(esp, Immediate(1 * kPointerSize)); 138 __ add(esp, Immediate(1 * kPointerSize));
128 __ pop(edx); 139 __ pop(edx);
129 __ pop(ebx); 140 __ pop(ebx);
130 __ ret(0); 141 __ ret(0);
131 142
132 CodeDesc desc; 143 CodeDesc desc;
133 masm->GetCode(&desc); 144 masm->GetCode(&desc);
134 // Call the function from C++. 145 // Call the function from C++.
135 int result = FUNCTION_CAST<F0>(buffer)(); 146 int result = FUNCTION_CAST<F0>(buffer)();
136 CHECK_EQ(0, result); 147 CHECK_EQ(0, result);
137 } 148 }
138 149
139 #undef __ 150 #undef __
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698