This commit fixes the encoding of conditional branch opcodes emitted for ARMv7-M targets, when the emitter decides to use the T3 encoding for said operation. Fields J1 and J2 are now present in the generated opcode word, along with correcting some minor issues in bitmasks and shifts computation. This fixes #17940. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
20 lines
287 B
Python
20 lines
287 B
Python
COUNT = 600
|
|
|
|
|
|
try:
|
|
code = """
|
|
@micropython.viper
|
|
def f() -> int:
|
|
x = 0
|
|
while x < 10:
|
|
"""
|
|
for i in range(COUNT):
|
|
code += " x += 1\n"
|
|
code += " return x"
|
|
exec(code)
|
|
except MemoryError:
|
|
print("SKIP-TOO-LARGE")
|
|
raise SystemExit
|
|
|
|
|
|
print(f())
|