Author: Armin Rigo <ar...@tunes.org> Branch: arm-longlong Changeset: r73249:373572aa281c Date: 2014-08-31 20:39 +0200 http://bitbucket.org/pypy/pypy/changeset/373572aa281c/
Log: bug fix: the signature 'iiiIi' used to think the last 'i' goes into r3, but actually nothing goes into r3. diff --git a/rpython/jit/backend/arm/callbuilder.py b/rpython/jit/backend/arm/callbuilder.py --- a/rpython/jit/backend/arm/callbuilder.py +++ b/rpython/jit/backend/arm/callbuilder.py @@ -313,8 +313,8 @@ argtypes = self.argtypes r_register_count = 0 - count = 0 # stack alignment counter on_stack = 0 + for i in range(len(arglocs)): argtype = INT if i < len(argtypes) and argtypes[i] == 'S': @@ -342,6 +342,8 @@ longlong_mask |= 2 r_register_count = 4 continue + elif r_register_count == 3: + r_register_count = 4 else: # A 64-bit float argument. Goes into the next free v# # register, or if none, to the stack aligned to an @@ -354,9 +356,8 @@ float_regs.append(reg) continue # float or longlong argument that needs to go on the stack - if count % 2 != 0: + if on_stack & 1: # odd: realign stack_args.append(None) - count = 0 on_stack += 1 stack_args.append(arg) on_stack += 2 @@ -371,9 +372,8 @@ singlefloats.append((arg, tgt)) else: # Singlefloat argument that needs to go on the stack # treated the same as a regular core register argument - count += 1 + stack_args.append(arg) on_stack += 1 - stack_args.append(arg) else: # Regular one-word argument. Goes into the next register # free from the list r0, r1, r2, r3, or to the stack. @@ -383,12 +383,11 @@ non_float_locs.append(arg) non_float_regs.append(reg) else: # non-float argument that needs to go on the stack - count += 1 + stack_args.append(arg) on_stack += 1 - stack_args.append(arg) # align the stack - if count % 2 != 0: + if on_stack & 1: # odd: realign stack_args.append(None) on_stack += 1 self._push_stack_args(stack_args, on_stack*WORD) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit