kopia lustrzana https://github.com/micropython/micropython
rodzic
0868942e77
commit
d1c3788375
|
@ -375,8 +375,8 @@ void asm_thumb_mov_reg_i32_aligned(asm_thumb_t *as, uint reg_dest, int i32) {
|
||||||
if ((as->code_offset & 3) == 0) {
|
if ((as->code_offset & 3) == 0) {
|
||||||
asm_thumb_op16(as, ASM_THUMB_OP_NOP);
|
asm_thumb_op16(as, ASM_THUMB_OP_NOP);
|
||||||
}
|
}
|
||||||
// jump over the i32 value (instruction prefect adds 4 to PC)
|
// jump over the i32 value (instruction prefetch adds 2 to PC)
|
||||||
asm_thumb_op16(as, OP_B_N(0));
|
asm_thumb_op16(as, OP_B_N(2));
|
||||||
// store i32 on machine-word aligned boundary
|
// store i32 on machine-word aligned boundary
|
||||||
asm_thumb_data(as, 4, i32);
|
asm_thumb_data(as, 4, i32);
|
||||||
// do the actual load of the i32 value
|
// do the actual load of the i32 value
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# check loading constants
|
||||||
|
|
||||||
|
@micropython.native
|
||||||
|
def f():
|
||||||
|
return 123456789012345678901234567890
|
||||||
|
|
||||||
|
print(f())
|
||||||
|
|
||||||
|
@micropython.native
|
||||||
|
def g():
|
||||||
|
return 1.2
|
||||||
|
|
||||||
|
print(g())
|
|
@ -0,0 +1,2 @@
|
||||||
|
123456789012345678901234567890
|
||||||
|
1.2
|
Ładowanie…
Reference in New Issue