hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp
changeset 18104 590c10f73634
parent 18097 acd70736bd60
child 24008 da7059252295
equal deleted inserted replaced
18103:a17a8a4b7e5c 18104:590c10f73634
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   717   if (s2.is_register())  sub(s1, s2.as_register(),          d);
   717   if (s2.is_register())  sub(s1, s2.as_register(),          d);
   718   else                 { sub(s1, s2.as_constant() + offset, d); offset = 0; }
   718   else                 { sub(s1, s2.as_constant() + offset, d); offset = 0; }
   719   if (offset != 0)       sub(d,  offset,                    d);
   719   if (offset != 0)       sub(d,  offset,                    d);
   720 }
   720 }
   721 
   721 
   722 inline void MacroAssembler::swap(Address& a, Register d, int offset) {
   722 inline void MacroAssembler::swap(const Address& a, Register d, int offset) {
   723   relocate(a.rspec(offset));
   723   relocate(a.rspec(offset));
   724   if (a.has_index()) { assert(offset == 0, ""); swap(a.base(), a.index(), d        ); }
   724   if (a.has_index()) { assert(offset == 0, ""); swap(a.base(), a.index(), d        ); }
   725   else               {                          swap(a.base(), a.disp() + offset, d); }
   725   else               {                          swap(a.base(), a.disp() + offset, d); }
   726 }
   726 }
   727 
   727