src/cpu/x86/vm/c1_Runtime1_x86.cpp

changeset 9290
119a08b69f70
parent 8877
f04097176542
child 9448
73d689add964
     1.1 --- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Wed Jan 31 19:24:57 2018 -0500
     1.2 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Wed Feb 07 07:01:44 2018 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -1667,31 +1667,15 @@
    1.11          __ jmp(done);
    1.12  
    1.13          __ bind(runtime);
    1.14 -        __ push(rcx);
    1.15 -#ifdef _LP64
    1.16 -        __ push(r8);
    1.17 -        __ push(r9);
    1.18 -        __ push(r10);
    1.19 -        __ push(r11);
    1.20 -#  ifndef _WIN64
    1.21 -        __ push(rdi);
    1.22 -        __ push(rsi);
    1.23 -#  endif
    1.24 -#endif
    1.25 +
    1.26 +        save_live_registers(sasm, 3);
    1.27 +
    1.28          // load the pre-value
    1.29          f.load_argument(0, rcx);
    1.30          __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
    1.31 -#ifdef _LP64
    1.32 -#  ifndef _WIN64
    1.33 -        __ pop(rsi);
    1.34 -        __ pop(rdi);
    1.35 -#  endif
    1.36 -        __ pop(r11);
    1.37 -        __ pop(r10);
    1.38 -        __ pop(r9);
    1.39 -        __ pop(r8);
    1.40 -#endif
    1.41 -        __ pop(rcx);
    1.42 +
    1.43 +        restore_live_registers(sasm);
    1.44 +
    1.45          __ bind(done);
    1.46  
    1.47          __ pop(rdx);
    1.48 @@ -1773,27 +1757,13 @@
    1.49  
    1.50          __ bind(runtime);
    1.51          __ push(rdx);
    1.52 -#ifdef _LP64
    1.53 -        __ push(r8);
    1.54 -        __ push(r9);
    1.55 -        __ push(r10);
    1.56 -        __ push(r11);
    1.57 -#  ifndef _WIN64
    1.58 -        __ push(rdi);
    1.59 -        __ push(rsi);
    1.60 -#  endif
    1.61 -#endif
    1.62 +
    1.63 +        save_live_registers(sasm, 3);
    1.64 +
    1.65          __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), card_addr, thread);
    1.66 -#ifdef _LP64
    1.67 -#  ifndef _WIN64
    1.68 -        __ pop(rsi);
    1.69 -        __ pop(rdi);
    1.70 -#  endif
    1.71 -        __ pop(r11);
    1.72 -        __ pop(r10);
    1.73 -        __ pop(r9);
    1.74 -        __ pop(r8);
    1.75 -#endif
    1.76 +
    1.77 +        restore_live_registers(sasm);
    1.78 +
    1.79          __ pop(rdx);
    1.80          __ bind(done);
    1.81  

mercurial