OLD | NEW |
---|---|
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 // mvn -> mov. | 262 // mvn -> mov. |
263 COMPARE(mvn(r3, Operand(-1), LeaveCC, al), | 263 COMPARE(mvn(r3, Operand(-1), LeaveCC, al), |
264 "e3a03000 mov r3, #0"); | 264 "e3a03000 mov r3, #0"); |
265 COMPARE(mvn(r4, Operand(-2), SetCC, al), | 265 COMPARE(mvn(r4, Operand(-2), SetCC, al), |
266 "e3b04001 movs r4, #1"); | 266 "e3b04001 movs r4, #1"); |
267 COMPARE(mvn(r5, Operand(0x0ffffff0), SetCC, ne), | 267 COMPARE(mvn(r5, Operand(0x0ffffff0), SetCC, ne), |
268 "13b052ff movnes r5, #-268435441"); | 268 "13b052ff movnes r5, #-268435441"); |
269 COMPARE(mvn(r6, Operand(-1), LeaveCC, ne), | 269 COMPARE(mvn(r6, Operand(-1), LeaveCC, ne), |
270 "13a06000 movne r6, #0"); | 270 "13a06000 movne r6, #0"); |
271 | 271 |
272 // mov -> movw. | |
273 if (CpuFeatures::IsSupported(ARMv7)) { | |
274 COMPARE(mov(r5, Operand(0x01234), LeaveCC, ne), | |
275 "13015234 movwne r5, #4660"); | |
276 // We only disassemble one instruction so the eor instruction is not here. | |
277 COMPARE(eor(r5, r4, Operand(0x1234), LeaveCC, ne), | |
278 "1301c234 movwne ip, #4660"); | |
279 // Movw can't do setcc so we don't get that here. Mov immediate with setcc | |
280 // is pretty strange anyway. | |
281 COMPARE(mov(r5, Operand(0x01234), SetCC, ne), | |
282 "159fc000 ldrne ip, [pc, #+0]"); | |
283 // We only disassemble one instruction so the eor instruction is not here. | |
284 // The eor does the setcc so we get a movw here. | |
285 COMPARE(eor(r5, r4, Operand(0x1234), SetCC, ne), | |
286 "1301c234 movwne ip, #4660"); | |
287 } | |
288 | |
289 // Eor doesn't have an eor-negative variant, but we can do an mvn followed by | |
290 // an eor to get the same effect. | |
291 COMPARE(eor(r5, r4, Operand(0xffffff34), SetCC, ne), | |
292 "13e0c0cb mvnne ip, #203"); | |
293 | |
Søren Thygesen Gjesse
2010/06/21 21:39:26
Missing movt test?
| |
272 // and <-> bic. | 294 // and <-> bic. |
273 COMPARE(and_(r3, r5, Operand(0xfc03ffff)), | 295 COMPARE(and_(r3, r5, Operand(0xfc03ffff)), |
274 "e3c537ff bic r3, r5, #66846720"); | 296 "e3c537ff bic r3, r5, #66846720"); |
275 COMPARE(bic(r3, r5, Operand(0xfc03ffff)), | 297 COMPARE(bic(r3, r5, Operand(0xfc03ffff)), |
276 "e20537ff and r3, r5, #66846720"); | 298 "e20537ff and r3, r5, #66846720"); |
277 | 299 |
278 // sub <-> add. | 300 // sub <-> add. |
279 COMPARE(add(r3, r5, Operand(-1024)), | 301 COMPARE(add(r3, r5, Operand(-1024)), |
280 "e2453b01 sub r3, r5, #1024"); | 302 "e2453b01 sub r3, r5, #1024"); |
281 COMPARE(sub(r3, r5, Operand(-1024)), | 303 COMPARE(sub(r3, r5, Operand(-1024)), |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 "e7ce1290 bfi r1, r0, #5, #10"); | 389 "e7ce1290 bfi r1, r0, #5, #10"); |
368 COMPARE(bfi(r0, r1, 31, 1), | 390 COMPARE(bfi(r0, r1, 31, 1), |
369 "e7df0f91 bfi r0, r1, #31, #1"); | 391 "e7df0f91 bfi r0, r1, #31, #1"); |
370 COMPARE(bfi(r1, r0, 31, 1), | 392 COMPARE(bfi(r1, r0, 31, 1), |
371 "e7df1f90 bfi r1, r0, #31, #1"); | 393 "e7df1f90 bfi r1, r0, #31, #1"); |
372 } | 394 } |
373 | 395 |
374 VERIFY_RUN(); | 396 VERIFY_RUN(); |
375 } | 397 } |
376 | 398 |
OLD | NEW |