Cooments to warn not to use certains instructions

- gas2ack cannot handle all variants of some instructions. Until this issues is
  addressed, this patch places a big warning where appropriate. This code is not
  supposed to change frequently.
This commit is contained in:
Tomas Hruby 2009-12-07 12:01:05 +00:00
parent 45a52f7acc
commit 51065a1b47
2 changed files with 14 additions and 0 deletions

View file

@ -549,12 +549,16 @@ fninit:
fnstsw: fnstsw:
xor %eax, %eax xor %eax, %eax
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fnstsw %ax fnstsw %ax
ret ret
fnstcw: fnstcw:
push %eax push %eax
mov 8(%esp), %eax mov 8(%esp), %eax
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fnstcw (%eax) fnstcw (%eax)
pop %eax pop %eax
ret ret
@ -599,6 +603,8 @@ read_cr2:
read_cr4: read_cr4:
push %ebp push %ebp
mov %esp, %ebp mov %esp, %ebp
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
mov %cr4, %eax mov %cr4, %eax
pop %ebp pop %ebp
ret ret
@ -611,6 +617,8 @@ write_cr4:
push %ebp push %ebp
mov %esp, %ebp mov %esp, %ebp
mov 8(%ebp), %eax mov 8(%ebp), %eax
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
mov %eax, %cr4 mov %eax, %cr4
jmp 0f jmp 0f
0: 0:

View file

@ -542,9 +542,12 @@ copr_not_available:
mov %ss:FP_SAVE_AREA_P(%ebp), %eax mov %ss:FP_SAVE_AREA_P(%ebp), %eax
cmp $0, osfxsr_feature cmp $0, osfxsr_feature
jz fp_l_no_fxsr /* FXSR is not avaible. */ jz fp_l_no_fxsr /* FXSR is not avaible. */
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fxrstor (%eax) fxrstor (%eax)
jmp copr_return jmp copr_return
fp_l_no_fxsr: fp_l_no_fxsr:
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
frstor (%eax) frstor (%eax)
copr_return: copr_return:
orw $MF_USED_FPU, (%ebx) /* fpu was used during last execution */ orw $MF_USED_FPU, (%ebx) /* fpu was used during last execution */
@ -612,10 +615,13 @@ lazy_fpu:
mov %ss:FP_SAVE_AREA_P(%eax), %eax mov %ss:FP_SAVE_AREA_P(%eax), %eax
cmp $0, osfxsr_feature cmp $0, osfxsr_feature
jz fp_s_no_fxsr /* FXSR is not avaible. */ jz fp_s_no_fxsr /* FXSR is not avaible. */
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fxsave (%eax) fxsave (%eax)
fninit fninit
jmp fp_saved jmp fp_saved
fp_s_no_fxsr: fp_s_no_fxsr:
/* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
fnsave (%eax) fnsave (%eax)
fwait /* required for compatibility with processors prior pentium */ fwait /* required for compatibility with processors prior pentium */
fp_saved: fp_saved: