OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [asm-arm/] [proc-armv/] [assembler.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  linux/asm-arm/proc-armv/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.
9
 *
10
 *  This file contains ARM processor specifics for
11
 *  the ARM6 and better processors.
12
 */
13
#define MODE_USR        USR_MODE
14
#define MODE_FIQ        FIQ_MODE
15
#define MODE_IRQ        IRQ_MODE
16
#define MODE_SVC        SVC_MODE
17
 
18
#define DEFAULT_FIQ     MODE_FIQ
19
 
20
/*
21
 * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc})
22
 */
23
#ifdef __STDC__
24
#define LOADREGS(cond, base, reglist...)\
25
        ldm##cond       base,reglist
26
#else
27
#define LOADREGS(cond, base, reglist...)\
28
        ldm/**/cond     base,reglist
29
#endif
30
 
31
/*
32
 * Build a return instruction for this processor type.
33
 */
34
#define RETINSTR(instr, regs...)\
35
        instr   regs
36
 
37
/*
38
 * Save the current IRQ state and disable IRQs.  Note that this macro
39
 * assumes FIQs are enabled, and that the processor is in SVC mode.
40
 */
41
        .macro  save_and_disable_irqs, oldcpsr, temp
42
        mrs     \oldcpsr, cpsr
43
        mov     \temp, #I_BIT | MODE_SVC
44
        msr     cpsr_c, \temp
45
        .endm
46
 
47
/*
48
 * Restore interrupt state previously stored in a register.  We don't
49
 * guarantee that this will preserve the flags.
50
 */
51
        .macro  restore_irqs, oldcpsr
52
        msr     cpsr_c, \oldcpsr
53
        .endm
54
 
55
/*
56
 * These two are used to save LR/restore PC over a user-based access.
57
 * The old 26-bit architecture requires that we do.  On 32-bit
58
 * architecture, we can safely ignore this requirement.
59
 */
60
        .macro  save_lr
61
        .endm
62
 
63
        .macro  restore_pc
64
        mov     pc, lr
65
        .endm
66
 
67
#define USER(x...)                              \
68
9999:   x;                                      \
69
        .section __ex_table,"a";                \
70
        .align  3;                              \
71
        .long   9999b,9001f;                    \
72
        .previous
73
 
74
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.