Mercurial > hg > truffle
comparison src/cpu/sparc/vm/assembler_sparc.cpp @ 2029:6ce496c8fc07
Merge
author | coleenp |
---|---|
date | Thu, 16 Dec 2010 09:31:55 -0500 |
parents | 2f644f85485d |
children | 7737fa7ec2b5 b1a2afa37ec4 |
comparison
equal
deleted
inserted
replaced
2028:450ece4d8a10 | 2029:6ce496c8fc07 |
---|---|
907 mov(L4, G4); // restore G4 | 907 mov(L4, G4); // restore G4 |
908 mov(L5, G5_method); // restore G5_method | 908 mov(L5, G5_method); // restore G5_method |
909 #if defined(COMPILER2) && !defined(_LP64) | 909 #if defined(COMPILER2) && !defined(_LP64) |
910 // Save & restore possible 64-bit Long arguments in G-regs | 910 // Save & restore possible 64-bit Long arguments in G-regs |
911 sllx(L0,32,G2); // Move old high G1 bits high in G2 | 911 sllx(L0,32,G2); // Move old high G1 bits high in G2 |
912 sllx(G1, 0,G1); // Clear current high G1 bits | 912 srl(G1, 0,G1); // Clear current high G1 bits |
913 or3 (G1,G2,G1); // Recover 64-bit G1 | 913 or3 (G1,G2,G1); // Recover 64-bit G1 |
914 sllx(L6,32,G2); // Move old high G4 bits high in G2 | 914 sllx(L6,32,G2); // Move old high G4 bits high in G2 |
915 sllx(G4, 0,G4); // Clear current high G4 bits | 915 srl(G4, 0,G4); // Clear current high G4 bits |
916 or3 (G4,G2,G4); // Recover 64-bit G4 | 916 or3 (G4,G2,G4); // Recover 64-bit G4 |
917 #endif | 917 #endif |
918 restore(O0, 0, G2_thread); | 918 restore(O0, 0, G2_thread); |
919 } | 919 } |
920 } | 920 } |
1439 if (low10(lo) != 0) | 1439 if (low10(lo) != 0) |
1440 or3 ( d, low10(lo), d); | 1440 or3 ( d, low10(lo), d); |
1441 sllx(tmp, 32, tmp); | 1441 sllx(tmp, 32, tmp); |
1442 or3 (d, tmp, d); | 1442 or3 (d, tmp, d); |
1443 } | 1443 } |
1444 } | |
1445 | |
1446 int MacroAssembler::size_of_set64(jlong value) { | |
1447 v9_dep(); | |
1448 | |
1449 int hi = (int)(value >> 32); | |
1450 int lo = (int)(value & ~0); | |
1451 int count = 0; | |
1452 | |
1453 // (Matcher::isSimpleConstant64 knows about the following optimizations.) | |
1454 if (Assembler::is_simm13(lo) && value == lo) { | |
1455 count++; | |
1456 } else if (hi == 0) { | |
1457 count++; | |
1458 if (low10(lo) != 0) | |
1459 count++; | |
1460 } | |
1461 else if (hi == -1) { | |
1462 count += 2; | |
1463 } | |
1464 else if (lo == 0) { | |
1465 if (Assembler::is_simm13(hi)) { | |
1466 count++; | |
1467 } else { | |
1468 count++; | |
1469 if (low10(hi) != 0) | |
1470 count++; | |
1471 } | |
1472 count++; | |
1473 } | |
1474 else { | |
1475 count += 2; | |
1476 if (low10(hi) != 0) | |
1477 count++; | |
1478 if (low10(lo) != 0) | |
1479 count++; | |
1480 count += 2; | |
1481 } | |
1482 return count; | |
1444 } | 1483 } |
1445 | 1484 |
1446 // compute size in bytes of sparc frame, given | 1485 // compute size in bytes of sparc frame, given |
1447 // number of extraWords | 1486 // number of extraWords |
1448 int MacroAssembler::total_frame_size_in_bytes(int extraWords) { | 1487 int MacroAssembler::total_frame_size_in_bytes(int extraWords) { |