From 89a7cf0936e9350ef857902c63cd0f073bad9af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Sat, 15 Jun 2019 00:00:01 +0000 Subject: [PATCH] x86 asm: improve jcc --- README.adoc | 5 ++++- userland/arch/x86_64/jcc.S | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index 00f9ba8..0da2614 100644 --- a/README.adoc +++ b/README.adoc @@ -11780,6 +11780,9 @@ The first examples you should look into are: ** <> ** <> * registers: <> +* jumping: +** <> +** <> * SIMD ** <> ** <> @@ -12404,8 +12407,8 @@ Jcc includes the instructions: JG vs JA and JL vs JB: +* https://stackoverflow.com/questions/9617877/assembly-jg-jnle-jl-jnge-after-cmp/56613928#56613928 * https://stackoverflow.com/questions/20906639/difference-between-ja-and-jg-in-assembly -* https://stackoverflow.com/questions/9617877/assembly-jg-jnle-jl-jnge-after-cmp === x86 SIMD diff --git a/userland/arch/x86_64/jcc.S b/userland/arch/x86_64/jcc.S index 3e645d4..706c71e 100644 --- a/userland/arch/x86_64/jcc.S +++ b/userland/arch/x86_64/jcc.S @@ -44,12 +44,12 @@ LKMC_PROLOGUE popf pushf - /* ! 0 > 255 */ + /* !(0 > 255) */ LKMC_ASSERT(jna) popf pushf - /* ! 0 < -1 */ + /* !(0 < -1) */ LKMC_ASSERT(jnl) popf pushf