comparison src/cpu/sparc/vm/assembler_sparc.inline.hpp @ 1926:a1e319b5b13a

Merge
author trims
date Thu, 11 Nov 2010 23:29:32 -0800
parents fff777a71346
children f95d63e2154a
comparison
equal deleted inserted replaced
1895:d4681dc64964 1926:a1e319b5b13a
1 /* 1 /*
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2010, 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.
204 inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); } 204 inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
205 inline void Assembler::ld( Register s1, RegisterOrConstant s2, Register d) { ld( Address(s1, s2), d); } 205 inline void Assembler::ld( Register s1, RegisterOrConstant s2, Register d) { ld( Address(s1, s2), d); }
206 inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); } 206 inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
207 207
208 // form effective addresses this way: 208 // form effective addresses this way:
209 inline void Assembler::add(const Address& a, Register d, int offset) {
210 if (a.has_index()) add(a.base(), a.index(), d);
211 else { add(a.base(), a.disp() + offset, d, a.rspec(offset)); offset = 0; }
212 if (offset != 0) add(d, offset, d);
213 }
209 inline void Assembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) { 214 inline void Assembler::add(Register s1, RegisterOrConstant s2, Register d, int offset) {
210 if (s2.is_register()) add(s1, s2.as_register(), d); 215 if (s2.is_register()) add(s1, s2.as_register(), d);
211 else { add(s1, s2.as_constant() + offset, d); offset = 0; } 216 else { add(s1, s2.as_constant() + offset, d); offset = 0; }
212 if (offset != 0) add(d, offset, d); 217 if (offset != 0) add(d, offset, d);
213 } 218 }