Search found 19 matches

by victor
Sat 2014-02-22 9:16
Forum: Command Line Tools
Topic: LCC Bug: Guard bits should be updated before right shifts
Replies: 10
Views: 5829

Re: LCC Bug: Guard bits should be updated before right shift

Thank you for all your hard work! I just tried the beta compiler to compile my project and no immediate problem is found. My project is about 4KiW in size, and the code only increases by 5 Words. I compared the binary produced by the beta compiler to the old binary, and I found 3 occurrences of guar...
by victor
Fri 2014-02-21 3:42
Forum: Command Line Tools
Topic: LCC Bug: Guard bits should be updated before right shifts
Replies: 10
Views: 5829

Re: LCC Bug: Guard bits should be updated before right shift

Adding a command line switch sounds like a good option. I do understand it is rather expensive to always add the code to sign-extend the guard bits. However, I still think this optimization (omitting guard bits extension before shifting/comparison) is unsafe and I would recommend that you disable it...
by victor
Wed 2014-02-19 23:06
Forum: Command Line Tools
Topic: LCC Bug: Negative number divisions
Replies: 3
Views: 3374

Re: LCC Bug: Negative number divisions

That makes sense. Thank you, Lasse. But please do mention this difference in compiler manuals and programming guides (I am not quite sure if it is there or not). Since sometimes users port an existing application to VSDSP and this kind of discrepancy between LCC and GCC could cause unexpected bugs. ...
by victor
Tue 2014-02-11 5:02
Forum: Command Line Tools
Topic: LCC Bug: Guard bits should be updated before right shifts
Replies: 10
Views: 5829

LCC Bug: Guard bits should be updated before right shifts

#define USE_STDOUT #include <stdlib.h> #include <stdio.h> #include <vstypes.h> s_int32 a = 0x80000000; s_int32 b = 0x00000001; main(void) { s_int32 c = a - b; // c = 0x7fffffff printf("(a - b) >> 16 = %08lx\n", c >> 16); return 0; } Output (code generated by LCC v1.47 (Dec 11 2013 14:49:00)): (a - ...
by victor
Tue 2014-02-11 4:45
Forum: Command Line Tools
Topic: LCC Bug: Negative number divisions
Replies: 3
Views: 3374

LCC Bug: Negative number divisions

#define USE_STDOUT #include <stdlib.h> #include <stdio.h> int a = -123; int c = 2; main(void) { int b = -123; printf("a=%d, a/2=%d, divide16signed(a,2)=%d, a%%2=%d, (a/2)*2+a%%2=%d\n", a, a/2, a/c, a%c, (a/c)*c+a%c); printf("b=%d, b/2=%d, divide16signed(b,2)=%d, b%%2=%d, (b/2)*2+b%%2=%d\n", b, b/2,...
by victor
Mon 2013-09-02 16:31
Forum: VS1005 and VSOS Software
Topic: INIT.APP with a serial port bootloader
Replies: 3
Views: 1330

Re: INIT.APP with a serial port bootloader

Well done, Victor, well done. 8-) I noticed you used the #pragma interrupt for the serial port driver, nice! How did you make it not nag about the missing symbol "INT_GLOB_ENA" :?: Respects, Panu That's a interesting question... I found the vsos02.o in my VSIDE installation folder was recently upda...
by victor
Mon 2013-09-02 4:07
Forum: VS1005 and VSOS Software
Topic: INIT.APP with a serial port bootloader
Replies: 3
Views: 1330

INIT.APP with a serial port bootloader

I made this simply because I don't want to remove/insert SD card every time I want to update my VSOS program (this is really annoying when you are debugging a program). Hope this can help other developers. Instructions: 1. Download the Init.APP to the root folder of your SD card; 2. Connect the UART...
by victor
Fri 2013-08-30 6:29
Forum: Command Line Tools
Topic: LCC v1.45 (Jun 19 2013 19:45:59) generates bad code
Replies: 3
Views: 3468

LCC v1.45 (Jun 19 2013 19:45:59) generates bad code

LCC shipped with VSIDE 2.20 fails to compile the following simple, legit C code. The code is used to implement a ring buffer. #include "vsos.h" u_int16* t; int main() { register char c; c = *t++; t = (u_int16 *)((u_int16)t & 0xff); return c; } Error message: ERROR 0: command encoding error: Unsuitab...
by victor
Sun 2011-02-20 7:56
Forum: VSIDE
Topic: Beginner questions
Replies: 2
Views: 2622

Re: Beginner questions

Where's the compiler manual with keywords/built-in functions list, etc? You may get answers in VSDSP Software Tools User’s Manual. VSDSP Software Tools User’s Manual and VSDSP2 USER’S MANUAL are included in the development tools for VS10XX.You can download the development tools here: http://www.vls...