Bugzilla – Attachment 215 Details for
Bug 222
Edge case in 680x0 addressing mode parsing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The patches!
0001-Fix-for-bug-222-680x0-parser-would-fail-with-reached.patch (text/plain), 1.35 KB, created by
ggn
on 2023-12-04 09:30:44 CST
(
hide
)
Description:
The patches!
Filename:
MIME Type:
Creator:
ggn
Created:
2023-12-04 09:30:44 CST
Size:
1.35 KB
patch
obsolete
>From 9b809794544a14f7e27accb5847bc633a4c50d87 Mon Sep 17 00:00:00 2001 >From: ggn <ggn@atari.org> >Date: Mon, 4 Dec 2023 17:30:02 +0200 >Subject: [PATCH] Fix for bug #222: 680x0 parser would fail with "reached end > of line while parsing expression" in certain conditions > >--- > parmode.h | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/parmode.h b/parmode.h >index 27863d0..bb32320 100644 >--- a/parmode.h >+++ b/parmode.h >@@ -962,10 +962,16 @@ IS_SUPPRESSEDn: > { > parenthesis_level--; > if (parenthesis_level < 0) return error("unbalanced parenthesis in expression"); >+ if (look_ahead[1] == DOTW || look_ahead[1] == DOTL) >+ { >+ tok--; >+ this_is_an_expression = 1; >+ break; >+ } > look_ahead++; > continue; > } >- if (*look_ahead == ACONST||*look_ahead==FCONST) >+ if (*look_ahead == ACONST || *look_ahead == FCONST) > { > look_ahead += 3; // Skip all the data associated with ACONST > continue; >@@ -979,7 +985,9 @@ IS_SUPPRESSEDn: > > // It could be that this is really just an expression prefixing a > // register as a displacement... >- if (*tok == '(') >+ // (ggn) Or we could have hit an expression from the peeking above which >+ // is postifixed by a ".w" or ".l" >+ if (*tok == '(' || *tok == DOTW || *tok == DOTL) > { > goto CHK_FOR_DISPn; > } >-- >2.40.1.windows.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 222
: 215