[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Why some ARM NEON helper functions need mask?
From: |
陳韋任 |
Subject: |
[Qemu-devel] Why some ARM NEON helper functions need mask? |
Date: |
Sun, 30 Oct 2011 19:39:08 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi, all
I am looking into QEMU's implementation for ARM NEON instructions
(target-arm/neon_helper.c). Some helper functions will do mask
operation, neon_add_u8, for example. I thought simply adding a and b
is enough and can't figure out why the mask operation is needed.
---
uint32_t HELPER(neon_add_u8)(uint32_t a, uint32_t b)
{
uint32_t mask;
mask = (a ^ b) & 0x80808080u;
a &= ~0x80808080u;
b &= ~0x80808080u;
return (a + b) ^ mask;
}
---
Any help is appreciated.
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
- [Qemu-devel] Why some ARM NEON helper functions need mask?,
陳韋任 <=