1.1 --- a/src/cpu/sparc/vm/assembler_sparc.inline.hpp Sat Oct 30 11:45:35 2010 -0700 1.2 +++ b/src/cpu/sparc/vm/assembler_sparc.inline.hpp Sat Oct 30 11:45:49 2010 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2010, 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 @@ -206,6 +206,11 @@ 1.11 inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); } 1.12 1.13 // form effective addresses this way: 1.14 +inline void Assembler::add(const Address& a, Register d, int offset) { 1.15 + if (a.has_index()) add(a.base(), a.index(), d); 1.16 + else { add(a.base(), a.disp() + offset, d, a.rspec(offset)); offset = 0; } 1.17 + if (offset != 0) add(d, offset, d); 1.18 +} 1.19 inline void Assembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) { 1.20 if (s2.is_register()) add(s1, s2.as_register(), d); 1.21 else { add(s1, s2.as_constant() + offset, d); offset = 0; }