Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @ 1399:90acda19b80f
Merge
author | jrose |
---|---|
date | Thu, 29 Apr 2010 00:03:40 -0700 |
parents | 314e17ca2c23 |
children | befdf73d6b82 |
comparison
equal
deleted
inserted
replaced
1395:454ff03c0daf | 1399:90acda19b80f |
---|---|
1242 #ifdef _LP64 | 1242 #ifdef _LP64 |
1243 __ movptr(dest->as_register(), from_addr); | 1243 __ movptr(dest->as_register(), from_addr); |
1244 break; | 1244 break; |
1245 #endif // _L64 | 1245 #endif // _L64 |
1246 case T_INT: | 1246 case T_INT: |
1247 // %%% could this be a movl? this is safer but longer instruction | 1247 __ movl(dest->as_register(), from_addr); |
1248 __ movl2ptr(dest->as_register(), from_addr); | |
1249 break; | 1248 break; |
1250 | 1249 |
1251 case T_LONG: { | 1250 case T_LONG: { |
1252 Register to_lo = dest->as_register_lo(); | 1251 Register to_lo = dest->as_register_lo(); |
1253 Register to_hi = dest->as_register_hi(); | 1252 Register to_hi = dest->as_register_hi(); |
1301 } else { | 1300 } else { |
1302 __ movb(dest_reg, from_addr); | 1301 __ movb(dest_reg, from_addr); |
1303 __ shll(dest_reg, 24); | 1302 __ shll(dest_reg, 24); |
1304 __ sarl(dest_reg, 24); | 1303 __ sarl(dest_reg, 24); |
1305 } | 1304 } |
1306 // These are unsigned so the zero extension on 64bit is just what we need | |
1307 break; | 1305 break; |
1308 } | 1306 } |
1309 | 1307 |
1310 case T_CHAR: { | 1308 case T_CHAR: { |
1311 Register dest_reg = dest->as_register(); | 1309 Register dest_reg = dest->as_register(); |
1313 if (VM_Version::is_P6() || from_addr.uses(dest_reg)) { | 1311 if (VM_Version::is_P6() || from_addr.uses(dest_reg)) { |
1314 __ movzwl(dest_reg, from_addr); | 1312 __ movzwl(dest_reg, from_addr); |
1315 } else { | 1313 } else { |
1316 __ movw(dest_reg, from_addr); | 1314 __ movw(dest_reg, from_addr); |
1317 } | 1315 } |
1318 // This is unsigned so the zero extension on 64bit is just what we need | |
1319 // __ movl2ptr(dest_reg, dest_reg); | |
1320 break; | 1316 break; |
1321 } | 1317 } |
1322 | 1318 |
1323 case T_SHORT: { | 1319 case T_SHORT: { |
1324 Register dest_reg = dest->as_register(); | 1320 Register dest_reg = dest->as_register(); |
1327 } else { | 1323 } else { |
1328 __ movw(dest_reg, from_addr); | 1324 __ movw(dest_reg, from_addr); |
1329 __ shll(dest_reg, 16); | 1325 __ shll(dest_reg, 16); |
1330 __ sarl(dest_reg, 16); | 1326 __ sarl(dest_reg, 16); |
1331 } | 1327 } |
1332 // Might not be needed in 64bit but certainly doesn't hurt (except for code size) | |
1333 __ movl2ptr(dest_reg, dest_reg); | |
1334 break; | 1328 break; |
1335 } | 1329 } |
1336 | 1330 |
1337 default: | 1331 default: |
1338 ShouldNotReachHere(); | 1332 ShouldNotReachHere(); |