Skip to content

Commit 020bbe9

Browse files
committed
archv7-m: removing the wrong args_in_out_different
- This commit removes the restriction in the `make()` function of `ldr`, `ldr_with_imm`, `ldrb_with_imm` and `ldrh_with_imm`, namely the line: `obj.args_in_out_different = [(0, 0)] # Can't have Rd==Ra`. - This restriction makes it harder for Slothy to find a solution in scenarios where the number of available registers was limited. Signed-off-by: willieyz <willie.zhao@chelpis.com>
1 parent e884ecf commit 020bbe9

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

slothy/targets/arm_v7m/arch_v7m.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,6 @@ def make(cls, src):
19111911
obj.increment = None
19121912
obj.pre_index = 0
19131913
obj.addr = obj.args_in[0]
1914-
obj.args_in_out_different = [(0, 0)] # Can't have Rd==Ra
19151914
return obj
19161915

19171916
def write(self):
@@ -1932,7 +1931,6 @@ def make(cls, src):
19321931
obj.increment = None
19331932
obj.pre_index = obj.immediate
19341933
obj.addr = obj.args_in[0]
1935-
obj.args_in_out_different = [(0, 0)] # Can't have Rd==Ra
19361934
return obj
19371935

19381936
def write(self):
@@ -1957,7 +1955,6 @@ def make(cls, src):
19571955
obj = Armv7mInstruction.build(cls, src)
19581956
obj.increment = None
19591957
obj.pre_index = obj.immediate
1960-
obj.args_in_out_different = [(0, 0)] # Can't have Rd==Ra
19611958
obj.addr = obj.args_in[0]
19621959
return obj
19631960

@@ -1976,7 +1973,6 @@ def make(cls, src):
19761973
obj = Armv7mInstruction.build(cls, src)
19771974
obj.increment = None
19781975
obj.pre_index = obj.immediate
1979-
obj.args_in_out_different = [(0, 0)] # Can't have Rd==Ra
19801976
obj.addr = obj.args_in[0]
19811977
return obj
19821978

0 commit comments

Comments
 (0)