src/cpu/x86/vm/c1_LIRAssembler_x86.cpp

Print this page




2445 #else
2446       int r_lo = right->as_constant_ptr()->as_jint_lo();
2447       int r_hi = right->as_constant_ptr()->as_jint_hi();
2448       switch (code) {
2449         case lir_logic_and:
2450           __ andl(l_lo, r_lo);
2451           __ andl(l_hi, r_hi);
2452           break;
2453         case lir_logic_or:
2454           __ orl(l_lo, r_lo);
2455           __ orl(l_hi, r_hi);
2456           break;
2457         case lir_logic_xor:
2458           __ xorl(l_lo, r_lo);
2459           __ xorl(l_hi, r_hi);
2460           break;
2461         default: ShouldNotReachHere();
2462       }
2463 #endif // _LP64
2464     } else {








2465       Register r_lo = right->as_register_lo();
2466       Register r_hi = right->as_register_hi();
2467       assert(l_lo != r_hi, "overwriting registers");

2468       switch (code) {
2469         case lir_logic_and:
2470           __ andptr(l_lo, r_lo);
2471           NOT_LP64(__ andptr(l_hi, r_hi);)
2472           break;
2473         case lir_logic_or:
2474           __ orptr(l_lo, r_lo);
2475           NOT_LP64(__ orptr(l_hi, r_hi);)
2476           break;
2477         case lir_logic_xor:
2478           __ xorptr(l_lo, r_lo);
2479           NOT_LP64(__ xorptr(l_hi, r_hi);)
2480           break;
2481         default: ShouldNotReachHere();
2482       }
2483     }
2484 
2485     Register dst_lo = dst->as_register_lo();
2486     Register dst_hi = dst->as_register_hi();
2487 




2445 #else
2446       int r_lo = right->as_constant_ptr()->as_jint_lo();
2447       int r_hi = right->as_constant_ptr()->as_jint_hi();
2448       switch (code) {
2449         case lir_logic_and:
2450           __ andl(l_lo, r_lo);
2451           __ andl(l_hi, r_hi);
2452           break;
2453         case lir_logic_or:
2454           __ orl(l_lo, r_lo);
2455           __ orl(l_hi, r_hi);
2456           break;
2457         case lir_logic_xor:
2458           __ xorl(l_lo, r_lo);
2459           __ xorl(l_hi, r_hi);
2460           break;
2461         default: ShouldNotReachHere();
2462       }
2463 #endif // _LP64
2464     } else {
2465 #ifdef _LP64
2466       Register r_lo;
2467       if (right->type() == T_OBJECT || right->type() == T_ARRAY) {
2468         r_lo = right->as_register();
2469       } else {
2470         r_lo = right->as_register_lo();
2471       }
2472 #else
2473       Register r_lo = right->as_register_lo();
2474       Register r_hi = right->as_register_hi();
2475       assert(l_lo != r_hi, "overwriting registers");
2476 #endif
2477       switch (code) {
2478         case lir_logic_and:
2479           __ andptr(l_lo, r_lo);
2480           NOT_LP64(__ andptr(l_hi, r_hi);)
2481           break;
2482         case lir_logic_or:
2483           __ orptr(l_lo, r_lo);
2484           NOT_LP64(__ orptr(l_hi, r_hi);)
2485           break;
2486         case lir_logic_xor:
2487           __ xorptr(l_lo, r_lo);
2488           NOT_LP64(__ xorptr(l_hi, r_hi);)
2489           break;
2490         default: ShouldNotReachHere();
2491       }
2492     }
2493 
2494     Register dst_lo = dst->as_register_lo();
2495     Register dst_hi = dst->as_register_hi();
2496