Qi Hu
1215317510
target/i386: Fix calculation of LOCK NEG eflags
After:
lock negl -0x14(%rbp)
pushf
pop %rax
%rax will contain the wrong value because the "lock neg" calculates the
wrong eflags. Simple test:
#include <assert.h>
int main()
{
__volatile__ unsigned test = 0x2363a;
__volatile__ char cond = 0;
asm(
"lock negl %0 \n\t"
"sets %1"
: "=m"(test), "=r"(cond));
assert(cond & 1);
return 0;
}
Reported-by: Jinyang Shen <shenjinyang@loongson.cn>
Co-Developed-by: Xuehai Chen <chenxuehai@loongson.cn>
Signed-off-by: Xuehai Chen <chenxuehai@loongson.cn>
Signed-off-by: Qi Hu <huqi@loongson.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-10-31 09:46:34 +01:00
..
2022-07-13 00:05:39 +02:00
2022-10-22 23:15:40 +02:00
2022-10-31 09:46:34 +01:00
2022-10-22 23:15:40 +02:00
2022-10-06 19:30:43 +04:00
2022-10-18 13:58:04 +02:00
2022-10-22 09:05:54 +02:00
2022-10-20 15:16:18 +02:00
2022-04-20 16:04:20 +01:00
2022-10-18 13:58:04 +02:00
2022-10-18 13:58:05 +02:00
2021-07-09 18:21:34 +02:00
2022-10-10 09:23:16 +02:00
2022-10-22 09:05:54 +02:00
2022-10-22 09:05:54 +02:00