From 9d1e140c0118fe79f7dac1c0f3a21f75cadb01f3 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Fri, 5 Feb 2021 00:50:00 +0100 Subject: [PATCH] Spec: Single precision floating point arithmetic is sufficient --- specification.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification.md b/specification.md index 1313f95..5849b74 100644 --- a/specification.md +++ b/specification.md @@ -418,7 +418,9 @@ The mC compiler targets x86 and uses GCC as back-end compiler. On an x86_64 system, GCC multi-lib support must be available and the flag `-m32` is passed to the compiler. The code generated by the back-end is compiled with the [GNU Assembler](https://en.wikipedia.org/wiki/GNU_Assembler) (by GCC). -Pay special attention to floating point and integer handling. + +Single precision floating point arithmetic is sufficient. +The `print_float` built-in only outputs 2 decimal places. Use [cdecl calling convention](https://en.wikipedia.org/wiki/X86_calling_conventions#cdecl). It is paramount to correctly implement the calling convention, otherwise the stack may get corrupted during function calls and returns.