x86/boot: fold branches in video handling code

Using Jcc to branch around a JMP is necessary only in pre-386 code,
where Jcc is limited to disp8. Use the opposite Jcc directly in two
places. Since it's adjacent, also convert an ORB to TESTB.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
Jan Beulich committed 2022-04-07 08:34:58 +02:00
1 parent 3b91082bb8
commit 2f576a65a0
1 file changed
+3 -6
+3 -6
View File
@@ -332,8 +332,7 @@ lment: movb $0, (%di)
cmpw $0x656d, (%si) # 'me'
jnz lmhx
cmpw $0x756e, 2(%si) # 'nu'
jnz lmhx
jmp listm
jz listm
lmhx: xorw %bx, %bx # Else => mode ID in hex
lmhex: lodsb
@@ -401,10 +400,8 @@ mode_set:
cmpb $VIDEO_FIRST_VESA>>8, %ah
jnc check_vesa
orb %ah, %ah
jnz setbad
jmp setmenu
testb %ah, %ah
jz setmenu
setbad: clc
ret
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.