xref: /linux/arch/arm/kernel/iwmmxt.h (revision cdd38c5f1ce4398ec58fec95904b75824daab7b5)
1*3c9f5708SJian Cai /* SPDX-License-Identifier: GPL-2.0 */
2*3c9f5708SJian Cai 
3*3c9f5708SJian Cai #ifndef __IWMMXT_H__
4*3c9f5708SJian Cai #define __IWMMXT_H__
5*3c9f5708SJian Cai 
6*3c9f5708SJian Cai .irp b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
7*3c9f5708SJian Cai .set .LwR\b, \b
8*3c9f5708SJian Cai .set .Lr\b, \b
9*3c9f5708SJian Cai .endr
10*3c9f5708SJian Cai 
11*3c9f5708SJian Cai .set .LwCSSF, 0x2
12*3c9f5708SJian Cai .set .LwCASF, 0x3
13*3c9f5708SJian Cai .set .LwCGR0, 0x8
14*3c9f5708SJian Cai .set .LwCGR1, 0x9
15*3c9f5708SJian Cai .set .LwCGR2, 0xa
16*3c9f5708SJian Cai .set .LwCGR3, 0xb
17*3c9f5708SJian Cai 
18*3c9f5708SJian Cai .macro wldrd, reg:req, base:req, offset:req
19*3c9f5708SJian Cai .inst 0xedd00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
20*3c9f5708SJian Cai .endm
21*3c9f5708SJian Cai 
22*3c9f5708SJian Cai .macro wldrw, reg:req, base:req, offset:req
23*3c9f5708SJian Cai .inst 0xfd900100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
24*3c9f5708SJian Cai .endm
25*3c9f5708SJian Cai 
26*3c9f5708SJian Cai .macro wstrd, reg:req, base:req, offset:req
27*3c9f5708SJian Cai .inst 0xedc00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
28*3c9f5708SJian Cai .endm
29*3c9f5708SJian Cai 
30*3c9f5708SJian Cai .macro wstrw, reg:req, base:req, offset:req
31*3c9f5708SJian Cai .inst 0xfd800100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
32*3c9f5708SJian Cai .endm
33*3c9f5708SJian Cai 
34*3c9f5708SJian Cai #ifdef __clang__
35*3c9f5708SJian Cai 
36*3c9f5708SJian Cai #define wCon c1
37*3c9f5708SJian Cai 
38*3c9f5708SJian Cai .macro tmrc, dest:req, control:req
39*3c9f5708SJian Cai mrc p1, 0, \dest, \control, c0, 0
40*3c9f5708SJian Cai .endm
41*3c9f5708SJian Cai 
42*3c9f5708SJian Cai .macro tmcr, control:req, src:req
43*3c9f5708SJian Cai mcr p1, 0, \src, \control, c0, 0
44*3c9f5708SJian Cai .endm
45*3c9f5708SJian Cai #endif
46*3c9f5708SJian Cai 
47*3c9f5708SJian Cai #endif
48