aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-05-03 06:47:15 +0800
committerTeddy <[email protected]>2014-05-03 06:47:15 +0800
commit72aee2b8f63707e9b699f4cf74fe96c6547efbd8 (patch)
tree5ac75d24c3305229240e4da9187561ff7dc93e5a
parentb6e7af77a5b8f0952eba93ac722bed2af318493f (diff)
...
-rw-r--r--mips.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mips.c b/mips.c
index affad2c..8e3c047 100644
--- a/mips.c
+++ b/mips.c
@@ -64,10 +64,9 @@ void mips_prologue() {
void mips_load(int reg, COpr_t opr) {
CVar_t var = cinterv_repr(opr)->info.var;
CType_t type = opr->type;
- if (opr->kind == VAR &&
- (type->type == CSTRUCT ||
+ if (type->type == CSTRUCT ||
type->type == CUNION ||
- type->type == CARR))
+ type->type == CARR)
{
if (var->global)
printf("\tla $%d, _%s\n", reg, var->name);