summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2003-01-20 18:02:11 +0000
committergibbs <gibbs@FreeBSD.org>2003-01-20 18:02:11 +0000
commit851c77f4f508d7f241eebb7bdc6605e85188aea7 (patch)
treee5dc26ba9bd54c29fb209e2690a462ab9fc9d228 /sys/dev/aic7xxx
parent6726f4815718de5d151ba97f66ec3fb4098cff75 (diff)
downloadFreeBSD-src-851c77f4f508d7f241eebb7bdc6605e85188aea7.zip
FreeBSD-src-851c77f4f508d7f241eebb7bdc6605e85188aea7.tar.gz
Allow constants to be complex expressions so long as those
expressions can be fully evaluated during assembly. Remove the numerical_value portion of the grammer which is no longer referenced.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_gram.y21
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
index fb3aa14..67e046d 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y
+++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
@@ -38,7 +38,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#26 $
+ * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_gram.y#29 $
*
* $FreeBSD$
*/
@@ -209,7 +209,7 @@ static int is_download_const(expression_t *immed);
%type <value> export ret f1_opcode f2_opcode jmp_jc_jnc_call jz_jnz je_jne
-%type <value> numerical_value mode_value mode_list macro_arglist
+%type <value> mode_value mode_list macro_arglist
%left '|'
%left '&'
@@ -707,7 +707,7 @@ expression:
;
constant:
- T_CONST T_SYMBOL numerical_value
+ T_CONST T_SYMBOL expression
{
if ($2->type != UNINITIALIZED) {
stop("Re-definition of symbol as a constant",
@@ -716,7 +716,7 @@ constant:
}
$2->type = CONST;
initialize_symbol($2);
- $2->info.cinfo->value = $3;
+ $2->info.cinfo->value = $3.value;
}
| T_CONST T_SYMBOL T_DOWNLOAD
{
@@ -784,17 +784,6 @@ macro_arglist:
}
;
-numerical_value:
- T_NUMBER
- {
- $$ = $1;
- }
-| '-' T_NUMBER
- {
- $$ = -$2;
- }
-;
-
scratch_ram:
T_SRAM '{'
{
@@ -994,6 +983,7 @@ critical_section_start:
cs->begin_addr = instruction_ptr;
in_critical_section = TRUE;
}
+;
critical_section_end:
T_END_CS ';'
@@ -1008,6 +998,7 @@ critical_section_end:
cs->end_addr = instruction_ptr;
in_critical_section = FALSE;
}
+;
export:
{ $$ = 0; }
OpenPOWER on IntegriCloud