diff options
author | 2024-03-11 07:56:23 +0000 | |
---|---|---|
committer | 2024-03-12 08:08:11 +0000 | |
commit | 7b6786441045496aaf84a0f40289a62ead431672 (patch) | |
tree | b59a0ee5aae855ac7c1fa3a52e44bdf664fb609b /test/712-varhandle-invocations/util-src/generate_java.py | |
parent | 208ade91673d0fc85041c024a158be0207d0bc3b (diff) |
riscv64: Fix `VarHandle.getAndAdd(..., 0)`.
Test: testrunner.py --target --64 --optimizing -t 712
Bug: 328420806
Change-Id: I6c12e66e5d0602b23af157016ba423aae7425031
Diffstat (limited to 'test/712-varhandle-invocations/util-src/generate_java.py')
-rw-r--r-- | test/712-varhandle-invocations/util-src/generate_java.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/712-varhandle-invocations/util-src/generate_java.py b/test/712-varhandle-invocations/util-src/generate_java.py index e32cee9763..352c4d9fc5 100644 --- a/test/712-varhandle-invocations/util-src/generate_java.py +++ b/test/712-varhandle-invocations/util-src/generate_java.py @@ -916,6 +916,8 @@ def emit_accessor_test(var_handle_kind, accessor, var_type, output_path): if var_type.supports_numeric == True: expansions['binop'] = accessor.get_java_numeric_operator() test_template = Template(""" + ${var_type} unchanged = (${var_type}) vh.${accessor_method}(${coordinates}(${var_type}) 0); + assertEquals(${initial_value}, unchanged); ${var_type} old_value = (${var_type}) vh.${accessor_method}(${coordinates}${updated_value}); assertEquals(${initial_value}, old_value); ${var_type} expected_value = (${var_type}) (${initial_value} ${binop} ${updated_value}); |