From: <pa...@pj...> - 2001-05-29 01:24:25
|
Inline asm is working a lot better now, and I really appreciate the fixes. I've got one more inline asm bug to report, which only seems to happen with fairly large blocks of assembly when a portion is ifdef'd out. Here's the code that reproduces the problem: http://www.pjrc.com/tmp/printf.c In this case, it looks like the preprocessor (or something) is adding a comment with illegal syntax into the assembly output, which of course causes asx8051 to choke. The comment looks like this: #line 521 "printf.c" and it occurs when a significant part of the inline asm has been ifdef'd out. Paul |
From: Johan K. <joh...@id...> - 2001-05-29 11:46:30
|
> I've got one more inline asm bug to report, which > only seems to happen with fairly large blocks of assembly when > a portion is ifdef'd out. In fact all false "#if"-s within an asm block larger that 8 lines will produce this. Sdcpp want's to keep track of the line numbers in the source file (although it often doesn't succeed :). Upto 8 lines in a false #if clause will be replaced by empty lines. If there are more, "#line ddd"-s will be outputted. Since the parser is in the <asm> state, it won't process them. I only see two options. Either sdcpp should outputs as many empty lines as there are in the false #if clause, or asmxxxx should treat "\n#whatever" as a comment. Since the preprocesser output isn't human friendly anyway, I propose the first one. Please comment. Johan |
From: Johan K. <joh...@id...> - 2001-05-30 20:39:02
|
> I only see two options. Either sdcpp should outputs as many empty lines as > there are in the false #if clause, or asmxxxx should treat "\n#whatever" as > a comment. Since the preprocesser output isn't human friendly anyway, I > propose the first one. Found and comitted another one, in SDCCpeeph.c:printLine() preprocessor directives are now commented out. Johan |