Commit a03c6ae3 by Sandra Loosemore Committed by Sandra Loosemore

tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.

2015-07-14  Sandra Loosemore  <sandra@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

	libgcc/
	* config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize
	for __nios2_arch__ level.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>

From-SVN: r225794
parent 973590f3
2015-07-14 Sandra Loosemore <sandra@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
* config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize
for __nios2_arch__ level.
2015-07-13 John Marino <gnugcc@marino.st>
* config/i386/t-dragonfly: New.
......
......@@ -33,13 +33,27 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define SC_REGNO 12
#define MOVHI(reg,imm16) \
/* Instruction encodings depend on the ISA level. */
#if __nios2_arch__ == 2
#define MOVHI(reg,imm16) \
(((reg) << 11) | ((imm16) << 16) | 0x34)
#define ORI(reg,imm16) \
(((reg) << 11) | ((reg) << 6) | ((imm16) << 16) | 0x14)
#define JMP(reg) \
(((reg) << 6) | (0x0d << 26) | 0x20)
#elif __nios2_arch__ == 1
#define MOVHI(reg,imm16) \
(((reg) << 22) | ((imm16) << 6) | 0x34)
#define ORI(reg,imm16) \
#define ORI(reg,imm16) \
(((reg) << 27) | ((reg) << 22) | ((imm16) << 6) | 0x14)
#define JMP(reg) \
#define JMP(reg) \
(((reg) << 27) | (0x0d << 11) | 0x3a)
#else
#error "Unknown Nios II architecture level"
#endif
void
__trampoline_setup (unsigned int *addr, void *fnptr, void *chainptr)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment