< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_32.cpp

Print this page




 413       __ jcc(Assembler::notEqual, L);
 414       __ stop("StubRoutines::forward exception: no pending exception (2)");
 415       __ bind(L);
 416     }
 417 #endif
 418 
 419     // Verify that there is really a valid exception in RAX.
 420     __ verify_oop(exception_oop);
 421 
 422     // continue at exception handler (return address removed)
 423     // rax: exception
 424     // rbx: exception handler
 425     // rdx: throwing pc
 426     __ jmp(handler_addr);
 427 
 428     return start;
 429   }
 430 
 431 
 432   //----------------------------------------------------------------------------------------------------
 433   // Support for int32_t Atomic::xchg(int32_t exchange_value, volatile int32_t* dest)
 434   //
 435   // xchg exists as far back as 8086, lock needed for MP only
 436   // Stack layout immediately after call:
 437   //
 438   // 0 [ret addr ] <--- rsp
 439   // 1 [  ex     ]
 440   // 2 [  dest   ]
 441   //
 442   // Result:   *dest <- ex, return (old *dest)
 443   //
 444   // Note: win32 does not currently use this code
 445 
 446   address generate_atomic_xchg() {
 447     StubCodeMark mark(this, "StubRoutines", "atomic_xchg");
 448     address start = __ pc();
 449 
 450     __ push(rdx);
 451     Address exchange(rsp, 2 * wordSize);
 452     Address dest_addr(rsp, 3 * wordSize);
 453     __ movl(rax, exchange);




 413       __ jcc(Assembler::notEqual, L);
 414       __ stop("StubRoutines::forward exception: no pending exception (2)");
 415       __ bind(L);
 416     }
 417 #endif
 418 
 419     // Verify that there is really a valid exception in RAX.
 420     __ verify_oop(exception_oop);
 421 
 422     // continue at exception handler (return address removed)
 423     // rax: exception
 424     // rbx: exception handler
 425     // rdx: throwing pc
 426     __ jmp(handler_addr);
 427 
 428     return start;
 429   }
 430 
 431 
 432   //----------------------------------------------------------------------------------------------------
 433   // Support for int32_t Atomic::xchg(volatile int32_t* dest, int32_t exchange_value)
 434   //
 435   // xchg exists as far back as 8086, lock needed for MP only
 436   // Stack layout immediately after call:
 437   //
 438   // 0 [ret addr ] <--- rsp
 439   // 1 [  ex     ]
 440   // 2 [  dest   ]
 441   //
 442   // Result:   *dest <- ex, return (old *dest)
 443   //
 444   // Note: win32 does not currently use this code
 445 
 446   address generate_atomic_xchg() {
 447     StubCodeMark mark(this, "StubRoutines", "atomic_xchg");
 448     address start = __ pc();
 449 
 450     __ push(rdx);
 451     Address exchange(rsp, 2 * wordSize);
 452     Address dest_addr(rsp, 3 * wordSize);
 453     __ movl(rax, exchange);


< prev index next >