1 /******************************************************************************
2 * Copyright (c) 2004, 2008 IBM Corporation
4 * This program and the accompanying materials
5 * are made available under the terms of the BSD License
6 * which accompanies this distribution, and is available at
7 * http://www.opensource.org/licenses/bsd-license.php
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
13 #define LOAD64(rn,name) \
14 lis rn,name##@highest; \
15 ori rn,rn,name##@higher; \
17 oris rn,rn,name##@h; \
20 #define LOAD32(rn, name) \
24 // load 32 bit constant in little endian order
25 #define LOAD32le(rn,name) \
26 lis rn,(((name>>8)&0x00FF)|((name<<8)&0xFF00)); \
27 ori rn,rn,(((name>>24)&0x00FF)|((name>>8)&0xFF00))
29 // load 16 bit constant in little endian order
30 #define LOAD16le(rn,name) \
31 li rn,(((name>>8)&0x00FF)|((name<<8)&0xFF00))
33 #define ENTRY(func_name) \
41 #define C_ENTRY(func_name) \
45 .section ".opd","aw"; \
48 .quad .func_name,.TOC.@tocbase,0; \
51 .type .func_name,@function; \
55 #define ASM_ENTRY(fn) \