diff options
author | Camil Staps | 2016-09-19 21:42:14 +0000 |
---|---|---|
committer | Camil Staps | 2016-09-19 21:42:14 +0000 |
commit | 74e486b4798bbce8bb8c14584bc0f07c1f0f644e (patch) | |
tree | 087ffecccc328805971ae4188c189d0efafb8ddf | |
parent | Added thumb_func (diff) |
Add .align before pushing program counter
-rw-r--r-- | cgthumb2was.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cgthumb2was.c b/cgthumb2was.c index 776ca14..334bd16 100644 --- a/cgthumb2was.c +++ b/cgthumb2was.c @@ -1484,6 +1484,7 @@ static void w_as_jsr_instruction (struct instruction *instruction) if (instruction->instruction_arity>1) switch (instruction->instruction_parameters[1].parameter_type){ case P_INDIRECT_WITH_UPDATE: + w_as_instruction_without_parameters (".align"); w_as_opcode ("add"); fprintf (assembly_file,"lr,pc,#9"); w_as_newline_after_instruction(); @@ -1497,6 +1498,7 @@ static void w_as_jsr_instruction (struct instruction *instruction) w_as_newline_after_instruction(); } else { if (instruction->instruction_arity>1) + w_as_instruction_without_parameters (".align"); w_as_opcode ("add"); w_as_scratch_register_comma(); fprintf (assembly_file,"pc,#9"); |