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
@ -500,9 +500,17 @@ fn generate_assembly_linux_x64_block(operations: &Vec<Operation>, functions: &Ve
|
||||
match datatype
|
||||
{
|
||||
Datatype::Int =>
|
||||
{
|
||||
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 =>
|
||||
{
|
||||
data.code += format!("\tmov qword [queue+8*r13], {}\n", if value == "true" { 1 } else { 0 }).as_str();
|
||||
|
Reference in New Issue
Block a user