Fix fasm error when enqueueing ints > 2^32
On x64 the only instruction supporting imm64 is mov rXX, imm64 so there has to be a special case for those numbers
This commit is contained in:
parent
1f78ad0a7f
commit
90d67867cc
10
src/main.rs
10
src/main.rs
@ -501,7 +501,15 @@ fn generate_assembly_linux_x64_block(operations: &Vec<Operation>, functions: &Ve
|
|||||||
{
|
{
|
||||||
Datatype::Int =>
|
Datatype::Int =>
|
||||||
{
|
{
|
||||||
data.code += format!("\tmov qword [queue+8*r13], {}\n", value).as_str();
|
if value.parse::<i64>().unwrap() > u32::MAX as i64
|
||||||
|
{
|
||||||
|
data.code += format!("\tmov rax, {}\n", value).as_str();
|
||||||
|
data.code += "\tmov qword [queue+8*r13], rax\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.code += format!("\tmov qword [queue+8*r13], {}\n", value).as_str();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Datatype::Bool =>
|
Datatype::Bool =>
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user