diff options
author | Homer Hsing <homer.xing@intel.com> | 2012-09-14 13:40:08 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2012-09-26 23:26:59 -0400 |
commit | 9d654318d7f4cbee3ca59c2eeb66bfcf9e57d02a (patch) | |
tree | 15f823b6dd0463061d81f0315c8e0e7d42a545f5 | |
parent | 182a52cb932ecb83f5f9ef9b164b502f7f9b5cee (diff) |
Make the entry point padding code logic looks nicer
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -300,7 +300,8 @@ int main(int argc, char **argv) entry->inst_offset = inst_offset; entry1 = entry->next; if (entry1 && entry1->islabel && is_entry_point(entry1->string)) { - while (((inst_offset+1) & 0x3) != 0) { + // insert empty instructions until (inst_offset+1) % 4 == 0 + while (((inst_offset+1) % 4) != 0) { tmp_entry = calloc(sizeof(*tmp_entry), 1); entry->next = tmp_entry; tmp_entry->next = entry1; |