From 822cd0336855b8648424b10cebcaa0b7c944dbca Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Mon, 13 May 2019 20:17:04 +0800 Subject: [PATCH] Disable mandelbrot on platforms without FP support Signed-off-by: Harry Chen --- ucore/src/mandelbrot.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ucore/src/mandelbrot.c b/ucore/src/mandelbrot.c index 4dfe35a..2e6dedb 100644 --- a/ucore/src/mandelbrot.c +++ b/ucore/src/mandelbrot.c @@ -2,6 +2,8 @@ #include #include +#if defined(__mips__) || defined(__x86_64__) + #define WIDTH 800 #define HEIGHT 600 @@ -113,3 +115,12 @@ int main(void) { } return 0; } + +#else + +int main(void) { + cprintf("This program can only run on platforms with floating point support.\n"); + return 0; +} + +#endif \ No newline at end of file