FreeCalypso > hg > fc-selenite
annotate src/cs/system/main/gcc/irq_twiddle.S @ 174:097e25b925a2
doc/Compiling: gtm900 target added
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 19 Jun 2019 06:15:56 +0000 |
parents | 95ef11e76c5b |
children |
rev | line source |
---|---|
78
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * TI's L1 code (and possibly other parts of the software suite) calls |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * functions named INT_DisableIRQ() and INT_EnableIRQ(); in TI's original |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * fw they are implemented (in a very ugly manner, as usual) in the |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * int.s entry point assembly module. Here we implement the same |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * functions in a cleaner way. |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 */ |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "asm_defs.h" |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 .code 32 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 .text |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 .globl INT_DisableIRQ |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 INT_DisableIRQ: |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 mrs r0, CPSR |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 orr r0, r0, #LOCKOUT |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 msr CPSR, r0 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 bx lr |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 .globl INT_EnableIRQ |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 INT_EnableIRQ: |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 mrs r0, CPSR |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 bic r0, r0, #LOCKOUT |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 msr CPSR, r0 |
95ef11e76c5b
src/cs/system/main/gcc: asm code pieced from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 bx lr |