assembler.h (69dbdd819599e2f3b77c172e83af512845bca5ad) assembler.h (247055aa21ffef1c49dd64710d5e94c2aee19b58)
1/*
2 * arch/arm/include/asm/assembler.h
3 *
4 * Copyright (C) 1996-2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 4 unchanged lines hidden (view full) ---

13 * Do not include any C declarations in this file - it is included by
14 * assembler source.
15 */
16#ifndef __ASSEMBLY__
17#error "Only include this from assembly code"
18#endif
19
20#include <asm/ptrace.h>
1/*
2 * arch/arm/include/asm/assembler.h
3 *
4 * Copyright (C) 1996-2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 4 unchanged lines hidden (view full) ---

13 * Do not include any C declarations in this file - it is included by
14 * assembler source.
15 */
16#ifndef __ASSEMBLY__
17#error "Only include this from assembly code"
18#endif
19
20#include <asm/ptrace.h>
21#include <asm/domain.h>
21
22/*
23 * Endian independent macros for shifting bytes within registers.
24 */
25#ifndef __ARMEB__
26#define pull lsr
27#define push lsl
28#define get_byte_0 lsl #0

--- 172 unchanged lines hidden (view full) ---

201 .endm
202#endif
203
204/*
205 * STRT/LDRT access macros with ARM and Thumb-2 variants
206 */
207#ifdef CONFIG_THUMB2_KERNEL
208
22
23/*
24 * Endian independent macros for shifting bytes within registers.
25 */
26#ifndef __ARMEB__
27#define pull lsr
28#define push lsl
29#define get_byte_0 lsl #0

--- 172 unchanged lines hidden (view full) ---

202 .endm
203#endif
204
205/*
206 * STRT/LDRT access macros with ARM and Thumb-2 variants
207 */
208#ifdef CONFIG_THUMB2_KERNEL
209
209 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort
210 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T()
2109999:
211 .if \inc == 1
2119999:
212 .if \inc == 1
212 \instr\cond\()bt \reg, [\ptr, #\off]
213 \instr\cond\()b\()\t\().w \reg, [\ptr, #\off]
213 .elseif \inc == 4
214 .elseif \inc == 4
214 \instr\cond\()t \reg, [\ptr, #\off]
215 \instr\cond\()\t\().w \reg, [\ptr, #\off]
215 .else
216 .error "Unsupported inc macro argument"
217 .endif
218
219 .pushsection __ex_table,"a"
220 .align 3
221 .long 9999b, \abort
222 .popsection

--- 18 unchanged lines hidden (view full) ---

241 usraccoff \instr, \reg, \ptr, \inc, 4, \cond, \abort
242 .endif
243
244 add\cond \ptr, #\rept * \inc
245 .endm
246
247#else /* !CONFIG_THUMB2_KERNEL */
248
216 .else
217 .error "Unsupported inc macro argument"
218 .endif
219
220 .pushsection __ex_table,"a"
221 .align 3
222 .long 9999b, \abort
223 .popsection

--- 18 unchanged lines hidden (view full) ---

242 usraccoff \instr, \reg, \ptr, \inc, 4, \cond, \abort
243 .endif
244
245 add\cond \ptr, #\rept * \inc
246 .endm
247
248#else /* !CONFIG_THUMB2_KERNEL */
249
249 .macro usracc, instr, reg, ptr, inc, cond, rept, abort
250 .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T()
250 .rept \rept
2519999:
252 .if \inc == 1
251 .rept \rept
2529999:
253 .if \inc == 1
253 \instr\cond\()bt \reg, [\ptr], #\inc
254 \instr\cond\()b\()\t \reg, [\ptr], #\inc
254 .elseif \inc == 4
255 .elseif \inc == 4
255 \instr\cond\()t \reg, [\ptr], #\inc
256 \instr\cond\()\t \reg, [\ptr], #\inc
256 .else
257 .error "Unsupported inc macro argument"
258 .endif
259
260 .pushsection __ex_table,"a"
261 .align 3
262 .long 9999b, \abort
263 .popsection

--- 12 unchanged lines hidden ---
257 .else
258 .error "Unsupported inc macro argument"
259 .endif
260
261 .pushsection __ex_table,"a"
262 .align 3
263 .long 9999b, \abort
264 .popsection

--- 12 unchanged lines hidden ---