X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemain.c;h=e41b4d958f2f51f530cf971156cbef90bd318d06;hb=a4c23fb5fdcaf600f18b4fa7b7e104fa9b7dc514;hp=77af774ae3188b3c05d3bdc98f7f9c6dc4f7c674;hpb=2c3cab8d946f54d9cf56318f61a8eb7f34323d4d;p=libfirm diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 77af774ae..e41b4d958 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -273,31 +273,35 @@ asm_constraint_flags_t be_parse_asm_constraints(const char *constraint) } } - if ( ((flags & ASM_CONSTRAINT_FLAG_MODIFIER_WRITE) - && (flags & ASM_CONSTRAINT_FLAG_MODIFIER_NO_WRITE)) - || ((flags & ASM_CONSTRAINT_FLAG_MODIFIER_READ - && (flags & ASM_CONSTRAINT_FLAG_MODIFIER_NO_READ)))) { + if (( + flags & ASM_CONSTRAINT_FLAG_MODIFIER_WRITE && + flags & ASM_CONSTRAINT_FLAG_MODIFIER_NO_WRITE + ) || ( + flags & ASM_CONSTRAINT_FLAG_MODIFIER_READ && + flags & ASM_CONSTRAINT_FLAG_MODIFIER_NO_READ + )) { flags |= ASM_CONSTRAINT_FLAG_INVALID; } - if (! (flags & (ASM_CONSTRAINT_FLAG_MODIFIER_READ - | ASM_CONSTRAINT_FLAG_MODIFIER_WRITE - | ASM_CONSTRAINT_FLAG_MODIFIER_NO_WRITE - | ASM_CONSTRAINT_FLAG_MODIFIER_NO_READ))) { + if (!(flags & (ASM_CONSTRAINT_FLAG_MODIFIER_READ | + ASM_CONSTRAINT_FLAG_MODIFIER_WRITE | + ASM_CONSTRAINT_FLAG_MODIFIER_NO_WRITE | + ASM_CONSTRAINT_FLAG_MODIFIER_NO_READ) + )) { flags |= ASM_CONSTRAINT_FLAG_MODIFIER_READ; } return flags; } -bool be_is_valid_clobber(const char *clobber) +int be_is_valid_clobber(const char *clobber) { /* memory is a valid clobber. (the frontend has to detect this case too, * because it has to add memory edges to the asm) */ if (strcmp(clobber, "memory") == 0) - return true; + return 1; /* cc (condition code) is always valid */ if (strcmp(clobber, "cc") == 0) - return true; + return 1; return isa_if->is_valid_clobber(isa_if, clobber); } @@ -895,10 +899,10 @@ void be_main(FILE *file_handle, const char *cup_name) ir_timer_t *t = NULL; /* The user specified another config file to read. do that now. */ - if(strlen(config_file) > 0) { + if (config_file[0] != '\0') { FILE *f; - if((f = fopen(config_file, "rt")) != NULL) { + if ((f = fopen(config_file, "rt")) != NULL) { lc_opt_from_file(config_file, f, NULL); fclose(f); }