From d03a6c8ffedd1496221eca5f02ba0215794cfaf9 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 7 Oct 2019 21:29:05 -0700 Subject: preproc: fix the detection of the >= operator There are *four* operators starting with ">": > >> >>> and >=. Signed-off-by: H. Peter Anvin --- asm/preproc.c | 4 +++- test/exitrep.asm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/asm/preproc.c b/asm/preproc.c index 3ee36c10..14a73885 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -1615,7 +1615,9 @@ static Token *tokenize(const char *line) p++; if (*p == '>') p++; - } + } else if (*p == '=') { + p++; + } break; case '<': diff --git a/test/exitrep.asm b/test/exitrep.asm index 3be87055..4e1b6e3c 100644 --- a/test/exitrep.asm +++ b/test/exitrep.asm @@ -6,7 +6,7 @@ %exitrep %endif mov ebx,i - %ifn i < 3 + %if i >= 3 %error iteration i should not be seen %endif %assign i i+1 -- cgit v1.2.3