Incorporate Z80 bugfixes reported by Phillip Klaus Krause

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4270 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-01-06 19:29:37 +00:00
parent a81a8867a6
commit ae529b8648
5 changed files with 80 additions and 8 deletions

View File

@ -15,7 +15,7 @@ nuttx/
(5) Binary loaders (binfmt/)
(16) Network (net/, drivers/net)
(2) USB (drivers/usbdev, drivers/usbhost)
(7) Libraries (lib/)
(8) Libraries (lib/)
(10) File system/Generic drivers (fs/, drivers/)
(1) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
@ -465,7 +465,7 @@ o Libraries (lib/)
Title: FGETS IMPLEMENTATION
Description: fgets implementation does not use C-buffered I/O, but rather
talks to serial driver directly via read(). It includes VT-100
specific editting commands. This gets should be renamed readlin()
specific editting commands. This gets should be renamed readline()
and a more generic fgets() should be implemented.
Status: Open
Priority: Low (unless you are using mixed C-buffered I/O with fgets and
@ -519,6 +519,21 @@ o Libraries (lib/)
Priority: Medium. This kind of operation is probably not very common in
deeply embedded systems but is required by standards.
Title: DIVIDE BY ZERO
Description: This is bug 3468949 on the SourceForge website (submitted by
Philipp Klaus Krause):
"lib_strtod.c does contain divisions by zero in lines 70 and 96.
AFAIK, unlike for Java, division by zero is not a reliable way to
get infinity in C. AFAIK compilers are allowed e.g. give a compile-
time error, and some, such as sdcc, do. AFAIK, C implementations
are not even required to support infinity. In C99 the macro isinf()
could replace the first use of division by zero. Unfortunately, the
macro INFINITY from math.h probably can't replce the second division
by zero, since it will result in a compile-time diagnostic, if the
implementation does not support infinity."
Status: Open
Priority:
o File system / Generic drivers (fs/, drivers/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1022,7 +1022,7 @@ static int can_bittiming(struct up_dev_s *priv)
uint32_t ts2;
uint32_t sjw;
canllvdbg("CAN%d PCLK1: %d baud: %d\n", priv->port,
canllvdbg("CAN%d PCLK: %d baud: %d\n", priv->port,
CAN_CLOCK_FREQUENCY(priv->divisor), priv->baud);
/* Try to get 14 quanta in one bit_time. That is based on the idea that the ideal

View File

@ -6,6 +6,16 @@ Current status
The xtrs port is not operational yet; some work still needs to be done.
Contents
^^^^^^^^
o Getting a TRS80 emulator and DOS disks
o Loading an executable into xtrs
o Configuring NuttX
o Building the SDCC toolchain
o SDCC Update
o Newer SDCC Versions
Getting a TRS80 emulator and DOS disks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -124,3 +134,24 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either
the older stable releases, or (2) wait for the next stable SDCC release
after 2.9.0.
Newer SDCC Versions
^^^^^^^^^^^^^^^^^^^
This is the text of bug 3468951 reported on the SourceForge website:
"Some obsolete stuff in z80sim port," (submitted by Philipp Klaus Krause):
The simz80 port needs a few updates to work well with current sdcc versions,
and has some unecessary stuff:
* The linker name for Make.defs should be sdldz80
* The assembler name for Make.defs should be sdasz80
* _asm and _endasm in z80_io.c and z80_irq.c should be replaced by __asm
and __endasm
* The --stack-auto --int-long-reent --float-reent options or Make.defs should
be removed, as they have no effect on sdcc's z80 port
* The current assembler AFAIK can handle long symbol names, so the
sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding
section from the README can be removed.
These changes have not yet been incorporated or verified.

View File

@ -8,6 +8,14 @@ http://nuttx.svn.sourceforge.net/viewvc/nuttx/trunk/misc/sims/z80sim
The SDCC toolchain is available from http://sdcc.sourceforge.net/. All
testing has been performed using version 2.6.0 of the SDCC toolchain.
Contents
^^^^^^^^
o Configuring NuttX
o Building the SDCC toolchain
o SDCC Update
o Newer SDCC Versions
Configuring NuttX
^^^^^^^^^^^^^^^^^
@ -99,6 +107,24 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either
the older stable releases, or (2) wait for the next stable SDCC release
after 2.9.0.
Newer SDCC Versions
^^^^^^^^^^^^^^^^^^^
This is the text of bug 3468951 reported on the SourceForge website:
"Some obsolete stuff in z80sim port," (submitted by Philipp Klaus Krause):
The simz80 port needs a few updates to work well with current sdcc versions,
and has some unecessary stuff:
* The linker name for Make.defs should be sdldz80
* The assembler name for Make.defs should be sdasz80
* _asm and _endasm in z80_io.c and z80_irq.c should be replaced by __asm
and __endasm
* The --stack-auto --int-long-reent --float-reent options or Make.defs should
be removed, as they have no effect on sdcc's z80 port
* The current assembler AFAIK can handle long symbol names, so the
sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding
section from the README can be removed.
These changes have not yet been incorporated or verified.

View File

@ -69,10 +69,10 @@
((((unsigned short)(ns)) >> 8) & 0x00ff))
# define HTONL(nl) \
(unsigned long) \
(((((unsigned long)(nl)) & 0x000000ffL) << 24) | \
((((unsigned long)(nl)) & 0x0000ff00L) << 8) | \
((((unsigned long)(nl)) & 0x00ff0000L) >> 8) | \
((((unsigned long)(nl)) & 0xff000000L) >> 24))
(((((unsigned long)(nl)) & 0x000000ffUL) << 24) | \
((((unsigned long)(nl)) & 0x0000ff00UL) << 8) | \
((((unsigned long)(nl)) & 0x00ff0000UL) >> 8) | \
((((unsigned long)(nl)) & 0xff000000UL) >> 24))
#endif
#define NTOHS(hs) HTONS(hs)