projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
50b724a
)
tarval: allow or/eor/and/andnot on references
author
Matthias Braun
<matze@braunis.de>
Fri, 4 Nov 2011 21:42:16 +0000
(22:42 +0100)
committer
Matthias Braun
<matze@braunis.de>
Mon, 7 Nov 2011 10:00:45 +0000
(11:00 +0100)
ir/tv/tv.c
patch
|
blob
|
history
diff --git
a/ir/tv/tv.c
b/ir/tv/tv.c
index
47ef2d4
..
ff38cc5
100644
(file)
--- a/
ir/tv/tv.c
+++ b/
ir/tv/tv.c
@@
-1186,6
+1186,7
@@
ir_tarval *tarval_and(ir_tarval *a, ir_tarval *b)
case irms_internal_boolean:
return (a == tarval_b_false) ? a : b;
case irms_internal_boolean:
return (a == tarval_b_false) ? a : b;
+ case irms_reference:
case irms_int_number:
sc_and(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
case irms_int_number:
sc_and(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
@@
-1206,6
+1207,7
@@
ir_tarval *tarval_andnot(ir_tarval *a, ir_tarval *b)
case irms_internal_boolean:
return a == tarval_b_true && b == tarval_b_false ? tarval_b_true : tarval_b_false;
case irms_internal_boolean:
return a == tarval_b_true && b == tarval_b_false ? tarval_b_true : tarval_b_false;
+ case irms_reference:
case irms_int_number:
sc_andnot(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
case irms_int_number:
sc_andnot(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
@@
-1229,6
+1231,7
@@
ir_tarval *tarval_or(ir_tarval *a, ir_tarval *b)
case irms_internal_boolean:
return (a == tarval_b_true) ? a : b;
case irms_internal_boolean:
return (a == tarval_b_true) ? a : b;
+ case irms_reference:
case irms_int_number:
sc_or(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
case irms_int_number:
sc_or(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
@@
-1252,6
+1255,7
@@
ir_tarval *tarval_eor(ir_tarval *a, ir_tarval *b)
case irms_internal_boolean:
return (a == b)? tarval_b_false : tarval_b_true;
case irms_internal_boolean:
return (a == b)? tarval_b_false : tarval_b_true;
+ case irms_reference:
case irms_int_number:
sc_xor(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);
case irms_int_number:
sc_xor(a->value, b->value, NULL);
return get_tarval(sc_get_buffer(), sc_get_buffer_length(), a->mode);