Mercurial > hg > graal-compiler
diff src/os_cpu/linux_x86/vm/linux_x86_32.s @ 2114:4fc084dac61e
7009756: volatile variables could be broken throw reflection API
Summary: Use Atomic::load() and Atomic::store() to access a volatile long.
Reviewed-by: iveresov, jrose, dholmes, never
author | kvn |
---|---|
date | Fri, 07 Jan 2011 10:16:57 -0800 |
parents | d93949c5bdcc |
children | bb8e3b66bde6 |
line wrap: on
line diff
--- a/src/os_cpu/linux_x86/vm/linux_x86_32.s Fri Jan 07 03:58:11 2011 -0800 +++ b/src/os_cpu/linux_x86/vm/linux_x86_32.s Fri Jan 07 10:16:57 2011 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ .globl _mmx_Copy_arrayof_conjoint_jshorts .globl _Atomic_cmpxchg_long + .globl _Atomic_move_long .text @@ -653,3 +654,15 @@ popl %ebx ret + + # Support for jlong Atomic::load and Atomic::store. + # void _Atomic_move_long(volatile jlong* src, volatile jlong* dst) + .p2align 4,,15 + .type _Atomic_move_long,@function +_Atomic_move_long: + movl 4(%esp), %eax # src + fildll (%eax) + movl 8(%esp), %eax # dest + fistpll (%eax) + ret +