2 * ARMv6 integer SIMD operations.
4 * Copyright (c) 2007 CodeSourcery.
5 * Written by Paul Brook
7 * This code is licenced under the GPL.
11 #define GE_ARG , uint32_t *gep
12 #define DECLARE_GE uint32_t ge = 0
13 #define SET_GE *gep = ge
16 #define DECLARE_GE do{}while(0)
17 #define SET_GE do{}while(0)
20 #define RESULT(val, n, width) \
21 res |= ((uint32_t)(glue(glue(uint,width),_t))(val)) << (n * width)
23 uint32_t HELPER(glue(PFX
,add16
))(uint32_t a
, uint32_t b GE_ARG
)
29 ADD16(a
>> 16, b
>> 16, 1);
34 uint32_t HELPER(glue(PFX
,add8
))(uint32_t a
, uint32_t b GE_ARG
)
40 ADD8(a
>> 8, b
>> 8, 1);
41 ADD8(a
>> 16, b
>> 16, 2);
42 ADD8(a
>> 24, b
>> 24, 3);
47 uint32_t HELPER(glue(PFX
,sub16
))(uint32_t a
, uint32_t b GE_ARG
)
53 SUB16(a
>> 16, b
>> 16, 1);
58 uint32_t HELPER(glue(PFX
,sub8
))(uint32_t a
, uint32_t b GE_ARG
)
64 SUB8(a
>> 8, b
>> 8, 1);
65 SUB8(a
>> 16, b
>> 16, 2);
66 SUB8(a
>> 24, b
>> 24, 3);
71 uint32_t HELPER(glue(PFX
,subaddx
))(uint32_t a
, uint32_t b GE_ARG
)
77 SUB16(a
>> 16, b
>> 16, 1);
82 uint32_t HELPER(glue(PFX
,addsubx
))(uint32_t a
, uint32_t b GE_ARG
)
88 ADD16(a
>> 16, b
>> 16, 1);