6502: correct typecasts for the break limit
authorAlan Cox <alan@linux.intel.com>
Tue, 27 Jan 2015 23:47:45 +0000 (23:47 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 27 Jan 2015 23:47:45 +0000 (23:47 +0000)
Kernel/cpu-6502/cpu.h

index 8710232..c861066 100644 (file)
@@ -30,7 +30,7 @@ extern size_t __fastcall__ strlen(const char *);
 
 /* High byte is saved, low byte is a mystery so take worst case. Also allow
    a bit less as C stack is not return stack */
-#define brk_limit() ((udata.u_syscall_sp | 0xFF) - 384)
+#define brk_limit() ((((uint16_t)udata.u_syscall_sp) | 0xFF) - 384)
 
 #define staticfast     static