Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 4b0986a3613c92f4ec1bdc7f60ec66fea135991f authored by Linus Torvalds on 22 May 2022, 19:52:31 UTC
Linux 5.18
Tip revision: 4b0986a
iwmmxt.h
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef __IWMMXT_H__
#define __IWMMXT_H__

.irp b, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
.set .LwR\b, \b
.set .Lr\b, \b
.endr

.set .LwCSSF, 0x2
.set .LwCASF, 0x3
.set .LwCGR0, 0x8
.set .LwCGR1, 0x9
.set .LwCGR2, 0xa
.set .LwCGR3, 0xb

.macro wldrd, reg:req, base:req, offset:req
.inst 0xedd00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
.endm

.macro wldrw, reg:req, base:req, offset:req
.inst 0xfd900100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
.endm

.macro wstrd, reg:req, base:req, offset:req
.inst 0xedc00100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
.endm

.macro wstrw, reg:req, base:req, offset:req
.inst 0xfd800100 | (.L\reg << 12) | (.L\base << 16) | (\offset >> 2)
.endm

#ifdef __clang__

#define wCon c1

.macro tmrc, dest:req, control:req
mrc p1, 0, \dest, \control, c0, 0
.endm

.macro tmcr, control:req, src:req
mcr p1, 0, \src, \control, c0, 0
.endm
#endif

#endif
back to top