Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/relocInfo_sparc.cpp @ 727:6b2273dd6fa9
6822110: Add AddressLiteral class on SPARC
Summary: The Address class on SPARC currently handles both, addresses and address literals, what makes the Address class more complicated than it has to be.
Reviewed-by: never, kvn
author | twisti |
---|---|
date | Tue, 21 Apr 2009 11:16:30 -0700 |
parents | dc7f315e41f7 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
725:928912ce8438 | 727:6b2273dd6fa9 |
---|---|
1 /* | 1 /* |
2 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1998-2009 Sun Microsystems, Inc. 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. |
97 guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op"); | 97 guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op"); |
98 ip->set_long_at(NativeInstruction::nop_instruction_size, ip->set_data32_simm13( inst2, (intptr_t)np)); | 98 ip->set_long_at(NativeInstruction::nop_instruction_size, ip->set_data32_simm13( inst2, (intptr_t)np)); |
99 break; | 99 break; |
100 } | 100 } |
101 ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x ); | 101 ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x ); |
102 #ifdef COMPILER2 | |
103 // [RGV] Someone must have missed putting in a reloc entry for the | |
104 // add in compiler2. | |
105 inst2 = ip->long_at( NativeMovConstReg::add_offset ); | |
106 guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op"); | |
107 ip->set_long_at(NativeMovConstReg::add_offset,ip->set_data32_simm13( inst2, (intptr_t)x+o)); | |
108 #endif | |
109 #else | 102 #else |
110 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi"); | 103 guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi"); |
111 inst &= ~Assembler::hi22( -1); | 104 inst &= ~Assembler::hi22( -1); |
112 inst |= Assembler::hi22((intptr_t)x); | 105 inst |= Assembler::hi22((intptr_t)x); |
113 // (ignore offset; it doesn't play into the sethi) | 106 // (ignore offset; it doesn't play into the sethi) |