From cf0b2d632644c5947b076b60cde381f6d0e6b9f5 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Wed, 21 Mar 2001 21:48:37 +0000 Subject: [PATCH] 2001-03-21 Ben Elliston * opc-itab.scm (compute-syntax): Emit a parse error if an operand name is empty or invalid -- eg. "$(rs)" instead of "($rs)". --- ChangeLog | 5 +++++ opc-itab.scm | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23a43ce..b4289b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-03-21 Ben Elliston + + * opc-itab.scm (compute-syntax): Emit a parse error if an operand + name is empty or invalid -- eg. "$(rs)" instead of "($rs)". + 2001-03-20 Patrick Macdonald * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation for diff --git a/opc-itab.scm b/opc-itab.scm index ca55b2a..03d347a 100644 --- a/opc-itab.scm +++ b/opc-itab.scm @@ -162,6 +162,8 @@ (substring syn 2 n))) "), "))))) (let ((n (id-len (string-drop1 syn)))) + (if (= n 0) + (parse-error context "empty or invalid operand name" syntax)) (loop (string-drop (1+ n) syn) (string-append result op-macro " (" (string-upcase -- 2.43.5