summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorjaortega <jaortega>2000-11-13 23:29:21 +0000
committerjaortega <jaortega>2000-11-13 23:29:21 +0000
commit8114f67e2642494421f4de4e9deb226ac3c5a8ee (patch)
treec34369e55b1679da256b34af2d95a048be02c307 /mixlib
parent0816906a35f472c778ca2fd22dfed42391bdae74 (diff)
downloadmdk-8114f67e2642494421f4de4e9deb226ac3c5a8ee.tar.gz
mdk-8114f67e2642494421f4de4e9deb226ac3c5a8ee.tar.bz2
corrected bug in stress3.mixal (pking)
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_ins.h2
-rw-r--r--mixlib/mix_parser.c8
-rw-r--r--mixlib/mix_scanner.l2
3 files changed, 9 insertions, 3 deletions
diff --git a/mixlib/mix_ins.h b/mixlib/mix_ins.h
index 5915a19..d0829e5 100644
--- a/mixlib/mix_ins.h
+++ b/mixlib/mix_ins.h
@@ -144,7 +144,7 @@ mix_ins_to_word(const mix_ins_t *ins);
extern mix_ins_id_t
mix_word_to_ins(mix_word_t w, mix_ins_t *ins);
-#define mix_word_set_address(word,addr) (word) |= ((addr)<<18)
+#define mix_word_add_address(word,addr) (word) |= ((addr)<<18)
/* decompose an instruction codified in a word into its parts */
#define mix_get_ins_address(word) ((mix_address_t)((word)>>18))
diff --git a/mixlib/mix_parser.c b/mixlib/mix_parser.c
index fc80a76..82dd692 100644
--- a/mixlib/mix_parser.c
+++ b/mixlib/mix_parser.c
@@ -209,7 +209,13 @@ update_future_refs_value_ (mix_parser_t *parser, const gchar *name,
node =
(ins_node_ *)g_tree_lookup (parser->ins_table,tmp->data);
g_assert (node);
- mix_word_set_address (node->ins, value);
+ if (mix_get_ins_address (node->ins) == 1) {
+ value = mix_short_negative (value);
+ node->ins = mix_word_set_field (node->ins,
+ MIX_WORD_ZERO,
+ mix_fspec_new (1,2));
+ }
+ mix_word_add_address (node->ins, value);
g_tree_insert (parser->ins_table, tmp->data, (gpointer)node);
tmp = g_slist_next (tmp);
}
diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l
index b1d4a13..c98d0b2 100644
--- a/mixlib/mix_scanner.l
+++ b/mixlib/mix_scanner.l
@@ -314,7 +314,7 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)*
if ( !mix_symbol_table_is_defined (parser->symbol_table, s) )
{
mix_parser_set_future_ref (parser, s);
- unput ('0');
+ unput (neg? '1':'0');
}
else
{