From cfe92f33bc20a84f145771d4e019fec01e5d4b8d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 24 Nov 2010 18:35:11 +0000 Subject: [PATCH] Change ambiguous (or invalid, depending on how strict you want to be :) assembly instruction "movw %rcx,2(%rax)" to "movw %cx,2(%rax)", since the intent was to move 16 bits of data, in this case. Found by: clang Reviewed by: kib --- sys/amd64/amd64/cpu_switch.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 952a70b87ab..3ad0ef71e71 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -276,7 +276,7 @@ load_dr: do_tss: movq %rdx,PCPU(TSSP) movq %rdx,%rcx movq PCPU(TSS),%rax - movw %rcx,2(%rax) + movw %cx,2(%rax) shrq $16,%rcx movb %cl,4(%rax) shrq $8,%rcx