1. 18 Oct, 2011 1 commit
    • Robert Sprowson's avatar
      Change to use StdTools. · 7f2ef214
      Robert Sprowson authored
      Be more quiet when cleaning.
      STM/LDM changed to Push/Pull.
      Moved an illegal instruction back into ARM's illegal instruction space.
      
      Version 5.62. Tagged as 'RISC_OSLib-5_62'
      7f2ef214
  2. 24 Sep, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix objasm 4 warnings. Enable (S|U)MULL/CLZ in math code. · a6d65423
      Jeffrey Lee authored
      Detail:
        s/longlong - The code has always had the ability to use CLZ & long multiply instructions, but it's never been enabled. The nonfunctional code to detect the CPU architecture at runtime has been disabled, and instead a fixed configuration is selected at compile time with the help of Hdr:CPU.Arch. Also added lots of ROUT's for safety.
        s/objmacs - Updated push/pop macros to make use of LDR/STR when only one register is to be transferred. This fixes a few objasm 4 warnings and should result in a speed boost where applicable.
      Admin:
        Tested on rev A2 BB-xM.
        Different math code configurations tested briefly.
      
      
      Version 5.61. Tagged as 'RISC_OSLib-5_61'
      a6d65423
  3. 06 Aug, 2011 1 commit
    • Jeffrey Lee's avatar
      Update to work with zero page relocation · 14a49538
      Jeffrey Lee authored
      Detail:
        clib/s/cl_stub, kernel/s/k_body, s/initmodule - Use OS_ReadSysInfo 6 to look up CLibWord/RISCOSLibWord/CLibCounter location each time it's needed instead of using hardcoded addresses. SWI overhead shouldn't be too bad since the zero page areas are rarely used.
        rlib/c/menu - Fix null pointer access when attempting to clear a submenu pointer via menu_submenu(...,...,NULL)
        s/h_workspc - Remove old local definitions of CLibCounter, RISCOSLibWorkSpace and CLibWorkSpace. Use Hdr:PublicWS instead.
      Admin:
        Tested on rev A2 BB-xM
      
      
      Version 5.60. Tagged as 'RISC_OSLib-5_60'
      14a49538
  4. 11 Dec, 2010 1 commit
  5. 06 Dec, 2010 1 commit
    • Robert Sprowson's avatar
      Import of JPEG support code to RISC_OSLib. · 95424385
      Robert Sprowson authored
      Functionality to query, plot, and transform a JPEG file modelled on the functions provided in 'sprite.c/h'.
      To be used to share more code between !Paint and !Draw.
      
      Version 5.59. Tagged as 'RISC_OSLib-5_59'
      95424385
  6. 30 Nov, 2010 1 commit
    • Robert Sprowson's avatar
      Enable 2 functions in RISC_OSLib shared entry table. · 7d3fe675
      Robert Sprowson authored
      Needed by !Paint 2.02.
      Fix some easy warnings in wimp.c/sprite.c.
      Add new function (not in the ROM version) 'wimp_baseofromsprites()'.
      bbc_adval fixed to return -1 when no ADC fitted to match Electron behaviour.
      Note: the 2 reenabled functions haven't been appended to the table, so anyone who linked a RAM application against 'romastubs' would need to relink.
      
      Version 5.58. Tagged as 'RISC_OSLib-5_58'
      7d3fe675
  7. 26 Nov, 2010 1 commit
    • Jeffrey Lee's avatar
      Fix alignment fault when reporting the "This file doesn't contain a BASIC program" error · 38fd341c
      Jeffrey Lee authored
      Detail:
        rlib/c/txtedit - Rather than generating a proper error block to send to Wimp_ReportError, txtedit__validbasicfile was just subtracting 4 from the pointer to the error string.
        The resulting address isn't guaranteed to be aligned properly, resulting in an alignment fault on ARMv7 when Wimp_ReportError examines the error number.
        The new code just reuses the 'buff' array to build a temporary error block.
      Admin:
        Fixes alignment fault on beagleboard when attempting to load a detokenized BASIC file into !Edit.
      
      
      Version 5.57. Tagged as 'RISC_OSLib-5_57'
      38fd341c
  8. 28 Nov, 2009 1 commit
    • Jeffrey Lee's avatar
      Improve safety & reliability of callback handling in SharedCLibrary · 96b4a3c3
      Jeffrey Lee authored
      Detail:
        CallBackHandler in kernel.s.k_body now ensures that the stored 'sp' and 'sl' values are word-aligned before attempting to read from 'sl' to verify that it points to a stack chunk. This avoids an exception being triggered in certain situations when alignment exceptions are turned on and a piece of hand-written assembler is using the sl register to store data.
      Admin:
        Further checks should be added to check that 'fp' is valid before calling _kernel_unwind, as _kernel_unwind currently only performs minimal checks that are not always sufficient.
        Tested on rev C2 beagleboard with KinoAmp pre-release.
      
      
      Version 5.56. Tagged as 'RISC_OSLib-5_56'
      96b4a3c3
  9. 17 Jul, 2009 1 commit
  10. 26 Jun, 2009 1 commit
    • Ben Avison's avatar
      Build process changes · 6bfb6dbc
      Ben Avison authored
      Detail:
        Install rule now takes an optional INSTTYPE switch: if this is set to
        "libraries" then instead of installing the SCL module, we install the
        headers, stubs, ansilib, risc_oslib and overlay manager libraries. This is
        intended primarily for the tools CD disc image.
        The component is also now cleaned in the "clean" phase. Historically, the
        exception made for this component (and OSLib and Desk, both now binary
        imports) was made on the grounds of speed, and this is not such an issue
        these days. Moreover, we need cleaning to take place on desktop disc builds
        because the SCL must be built and installed in both APCS-R and APCS-32
        versions, which requires an intermediate clean.
      Admin:
        Tested in a Tools CD build.
      
      Retagged as 'RISC_OSLib-5_54'
      
      Version 5.54. Not tagged
      6bfb6dbc
  11. 14 Jun, 2009 1 commit
    • Ben Avison's avatar
      Build fix · e05a2099
      Ben Avison authored
      Detail:
        s.makehswis used to pull in various IO header files. There was no good
        reason for this, and doing so causes a dependency upon Hdr:Machine.<Machine>
        to define which generation of IOC/IOMD is in use - which is a problem if
        the C library is to be built where Machine=All.
      Admin:
        Tested in a Machine=All build.
      
      Version 5.54. Not tagged
      e05a2099
  12. 07 Jun, 2009 2 commits
    • Ben Avison's avatar
      Build fix · c676e8e6
      Ben Avison authored
      Detail:
        Some users reported problems building the sources if they had other
        installations of perl on their build machine. The build system was using a
        mixture of "perl" and "<Perl$Dir>.perl" to invoke the interpreter, and
        sometimes but not always using "do" to expand system variables on the
        command line. This has now been standardised to use "do <Perl$Dir>.perl in
        all cases, and where possible, to use the makefile macro ${PERL}.
      Admin:
        Checked that a Tungsten build still works on a build machine with no other
        perl installation. "perl" was aliased to an error to ensure it wasn't used.
      
      Version 5.54. Not tagged
      c676e8e6
    • Ben Avison's avatar
      Build fix · fecfa2d2
      Ben Avison authored
      Detail:
        Previous commit moved the location of the EditIntern directory within the
        sources but did not update the export rules in the Makefile to match.
        The result was that Edit no longer builds from clean, breaking Tungsten and
        IOMD ROM builds.
      Admin:
        Checked in a TungstenDev build.
      
      Version 5.54. Not tagged
      fecfa2d2
  13. 31 May, 2009 3 commits
    • Peter Naulls's avatar
      Normalise include paths · 6e15bfa0
      Peter Naulls authored
      Detail:
       Fix missed change from last commit
      Admin:
       None
      
      Version 5.54. Not tagged
      6e15bfa0
    • Peter Naulls's avatar
      Normalise C and assembler include paths · ca954eea
      Peter Naulls authored
      Detail:
       This changes all the C and assembler includes to be a canoncial Unix format.
       Also match include paths to previous commit for EditIntern/DrawIntern/VerIntern
       Finally, also include some minor type fixes (NULL vs 0)
      Admin:
       May be some other paths elsewhere in the source I'm not immediately able to fix.  Will address any issues ASAP, since this is a huge change.
      
      Version 5.54. Not tagged
      ca954eea
    • Peter Naulls's avatar
      Rationalize C include path usage · 34c122aa
      Peter Naulls authored
       Detail:
        Parts of RISCOS_Lib use non-standard paths that only really work on native RISC OS compilitation.
        This moves the relevant files into a more normalized dir.h.file format.
       Admin:
        Not tested yet.  #include path changes to follow.
      
      Version 5.54. Not tagged
      34c122aa
  14. 04 Oct, 2008 1 commit
    • Ben Avison's avatar
      Merged in changes from Castle · c4b59b37
      Ben Avison authored
      Detail:
        Added terminating null to clib messages file for tokens C53, C36, C37, C66,
        C70
        appears lost a while ago .. error in field suggested need for this.
        examination of r0 3.7 etc clib messages file showed NULLs here.. believe
        they are the only messages in clib that can emerge through a printf.. and
        this need a null terminator.
      Admin:
        Not tested
      
      Version 5.54. Tagged as 'RISC_OSLib-5_54'
      c4b59b37
  15. 17 Mar, 2005 1 commit
  16. 14 Mar, 2005 1 commit
    • Kevin Bracey's avatar
      * Improved stdio to allocate extra FILE objects beyond the static array of 16.... · 0d936eec
      Kevin Bracey authored
      * Improved stdio to allocate extra FILE objects beyond the static array of 16. Number of open files now only limited by memory and the OS.
      
      * FOPEN_MAX in <stdio.h> increased from 8 to 16 to reflect reality.
      * Minor corrections to comments in <stdio.h>.
      * Library shutdown tidied for modules. In particular, shutdown of I/O was
        broken for modules which had been entered as applications.
      
      Version 5.53. Tagged as 'RISC_OSLib-5_53'
      0d936eec
  17. 07 Mar, 2005 1 commit
  18. 09 Nov, 2004 1 commit
    • Ben Avison's avatar
      BBE-related changes: · aec3b552
      Ben Avison authored
      * clib.rom_link_v doesn't seem to have been kept in step with the changes
        to srcbuild as part of the cross-compilation work: it is no longer the
        job of the verbatim rom link makefie fragment to provide a rom_link rule.
        An appropriate alternative set of forwarding rules have been implemented
        instead.
      * clib.rom_link_v was never taught about the new C99 library chunks, and the
        relevant s files weren't being exported in the BBE phase either.
      
      Retagged since this won't affect code generation for existing builds.
      aec3b552
  19. 27 Oct, 2004 1 commit
    • Ben Avison's avatar
      Bugfix and system mode support. · 38e071b3
      Ben Avison authored
      Detail:
        * Fixed signed pointer comparison: most top-bit-set pointers passed to
          _kernel_raise_error() were being translated into "Exit called"
        * Stack extension is now permitted in SYS mode; includes support in longjmp()
      Admin:
        Verified that stack extension works.
      
      Version 5.51. Tagged as 'RISC_OSLib-5_51'
      38e071b3
  20. 01 Jul, 2004 1 commit
  21. 23 Jan, 2004 1 commit
    • Kevin Bracey's avatar
      <ctype.h> * isblank() added. · 8f9cfb8a
      Kevin Bracey authored
                * isprint() now true for non-breaking spaces
      <math.h>  * FP_INFINITY corrected to FP_INFINITE
                * fma(), fmal(), llrint(), llrintf(), llrintl(),
                  llround(), llroundf(), llroundl(),
                  remquo(), remquof(), remquol() added.
                * added inlining for remainder() and fmaf() and various
                  float functions.
                * math_errhandling removed pending overhaul - it was misleading.
                * expm1() and log1p() now provide decent (< 1 ulp) accuracy,
                  rather than only being marginally better than exp(x)-1 and
                  log(1+x).
                * new version of copysign() with standard calling conventions.
                * some C99 functions changed to use infinity/NaNs and exceptions
                  for error handling - see comments in header file about the
                  changes in progress.
      <stdio.h>  * output from %a now correctly rounded
      <stdlib.h> * strtof() and strtold() added.
      <string.h> * strerror() no longer clears _kernel_last_oserror().
      
      Version 5.49. Tagged as 'RISC_OSLib-5_49'
      8f9cfb8a
  22. 02 Dec, 2003 1 commit
    • Ben Avison's avatar
      Changes for Customer W; also suitable for building on an Iyonix. · 20ee3c3f
      Ben Avison authored
      Detail:
        * No longer uses aasm to build h.swis.
        * (Only) compatible with new C compilers: assumes const static data is
          placed in separate read-only areas, and suitable command-line switch
          is used to ensure that library static data is never placed in a zero-
          init area.
        * Stack extension code now thread-safe.
        * Heap thread-safety code (in clib) now uses SWP instruction test results
          from stack extension code (in kernel) - as a side effect, the exported
          symbol _swp_available now exists, if you need to use it elsewhere.
        * Slightly closer to having top-bit-set heap addresses working.
      Admin:
        Tested in a Tungsten build, and with Customer W's test suite.
      
      Version 5.48. Tagged as 'RISC_OSLib-5_48'
      20ee3c3f
  23. 03 Nov, 2003 1 commit
    • Ben Avison's avatar
      Ansilib improvements, and a bugfix to system() · 1c7c8124
      Ben Avison authored
      Detail:
        * _kernel_irqs_disabled() is included in ansilib build, now needed for
          ARM 2 SWP replacement in c.alloc
        * _kernel_entrypoint() for ansilib now initialises relocation offsets in
          root stack chunk, necessary if linking with -zm object code
        * system() implementation now calls DDEUtils_FlushCL if starting a
          short command line - necessary in case previous system() call was a
          long command line directed at a DDE-unaware application
      Admin:
        Ansilib changes tested, DDE change not expected to cause problems.
      
      Version 5.47. Not tagged
      1c7c8124
  24. 13 Oct, 2003 1 commit
  25. 09 Oct, 2003 1 commit
    • Ben Avison's avatar
      Changes required for Customer W. · d08d7612
      Ben Avison authored
      Detail:
        * Implemented the thread-safety mutex macros for the user mode heap.
        * Created ansilibm, a version of ansilib suitable for building modules.
        * Fixed an overestimation of the size of the workspace passed to
          SharedCLibrary_LibInitModule[APCS_32] by the stubs.
        * Fixed bug in SharedCLibrary_LibInitModule[APCS_32] regarding handling of
          non-reentrant modules - if module code was at a higher address than the
          module data, then all the intervening data would be pointlessly copied
          back over itself with no allowance for volatility.
        * Removed the bsearch source file, since it was only required for APCS-A
          which the library has not supported since the year 2000, and which the
          compiler is now no longer able to build.
      Admin:
        ansilibm builds working modules, but thread safety has not been
        extensively tested.
      
      Version 5.47. Tagged as 'RISC_OSLib-5_47'
      d08d7612
  26. 15 Apr, 2003 1 commit
    • Kevin Bracey's avatar
      * __assert2() added to support for C99 assert(), which displays function name. · f126a1ab
      Kevin Bracey authored
      * _Exit() added.
      * Lots of new <math.h> functions (acosh, asinh, atanh, exp2, expm1,
        ilogb, log1p, log2, logb, scalbn, scalbln, cbrt, erf, erfc,
        lgamma, tgamma, nexttoward, fmaf). Float and long double forms
        of every function added; long double forms are included as another
        library object in the stubs rather than the shared library, as they
        just branch to the double form.
      * Subnormal/NaN/infinity cases in various <math.h> functions improved.
      * Added <tgmath.h>.
      * Headers brought into line with CC 5.54.
      * RMEnsures added to C library initialisation to try to load minimum
        CallASWI, FPEmulator, CLib. No errors reported if load fails.
      * A few pointless inter-file dependencies removed to reduce minimum
        size of included ANSILib.
      
      Version 5.46. Tagged as 'RISC_OSLib-5_46'
      f126a1ab
  27. 17 Jan, 2003 1 commit
  28. 16 Jan, 2003 1 commit
    • Ben Avison's avatar
      Misc changes. · aa313346
      Ben Avison authored
      Detail:
        * Improved lookup of application Sprites file: uses Wimp_Extend 13 (in
          Wimps that support it) to work out the appropriate resolution suffix,
          and prefixes with "<Wimp$IconTheme>" to allow a future Theme Manager
          to operate.
        * Preserves attributes of any existing file when saving sprite or text
          files.
        * Changed two null menu handles from 0 to (doucmented) -1. Despite the
          fact that the Wimp is actually happy with 0 as a null handle here,
          this was reported as a fault.
        * Changed rlib.c.version to use VersionNum, deleted thereby-obsoleted
          rlib.h.VerIntern.version file. Not that rlib.c.version seems to be used
          at the moment.
        * Added Kevin's additions to the test directory.
      Admin:
        Tested briefly.
      
      Version 5.44. Not tagged
      aa313346
  29. 15 Nov, 2002 1 commit
    • Kevin Bracey's avatar
      ROM build fixed for 64-bit stuff. · f207fcb2
      Kevin Bracey authored
      PCI added to swis.h
      alloc.c updated to handle bigger slots (new code merged from ARM libraries)
      Various 32-bit fixes for backtracing, and general trap handling.
      Polite "Application is not 32-bit compatible" message.
      Headers <stdint.h> and <inttypes.h> fixed to work in non-C99 mode.
      txt changed to do new-style Delete behaviour
      
      Version 5.44. Tagged as 'RISC_OSLib-5_44'
      f207fcb2
  30. 12 Aug, 2002 1 commit
    • Ben Avison's avatar
      How did we not notice this before? · 45c70245
      Ben Avison authored
      Detail:
        Fixed a stack imbalance in _memcpy that's been there since 32-bitting.
      Admin:
        Not tested yet.
      
      Version 5.43. Tagged as 'RISC_OSLib-5_43'
      45c70245
  31. 23 Jul, 2002 1 commit
  32. 22 May, 2002 2 commits
    • Kevin Bracey's avatar
      * Added two new library chunks, 4 and 5, which contain extensions to the... · 89eac61e
      Kevin Bracey authored
      * Added two new library chunks, 4 and 5, which contain extensions to the kernel and C library respectively. These have no static data associated with them, just being extensions of the stub tables. The reason for this is to minimise wasted space in programs that don't use the C99 facilities; o.stubs is now a library split into 3 pieces - basic kernel and CLib, extra kernel and extra
      
        CLib; only the bits a program needs get included.
      
      * Previous extensions to the C library stubs revoked - they now stop at _swix;
        all the new C99 functions now live in chunk 4. Anyone using those new
        functions should relink with new stubs and ensure this C library version.
      
      * printf/scanf now support 64-bit types through "ll" and "j" length modifiers.
      
      * Run-time support for VLAs (__rt_allocauto and __rt_freeauto) added. No
        attempt is currently made to clear up on longjmp or to cope with someone
        changing the kernel allocator while a VLA is active. These would be a
        future enhancement.
      
      * Added complete 64-bit run-time support (48 functions) to kernel library;
        these functions are compatible with the ones used by the ARM ADS. Many of
        the simpler functions will not normally be used by the compiler, as it
        will generate inline code. There is scope for improvement by switching
        in MULL and CLZ-using forms of multiply and divide when possible.
      
      * llabs and lldiv added to C library.
      
      * Header files corrected in a few areas, and changed to match the C compiler.
        <stdint.h> and <stdbool.h> now require the compiler to be in C99 mode
        (as detected using __STDC_VERSION__).
      
      
      Version 5.41. Tagged as 'RISC_OSLib-5_41'
      89eac61e
    • Ben Avison's avatar
      Created cleanroom implementation of 64-bit integer support for licencing... · 280c51dc
      Ben Avison authored
      Created cleanroom implementation of 64-bit integer support for licencing reasons. Tested fairly thoroughly (in fact, this testing showed up a bug in the old code which unbalanced the stack for 50% of cases where you divided a negative long long by 10). Hopefully should work faster than the old code too!
      
      Reapplied all relevant old tags.
      
      Real commit date 2008-03-18.
      280c51dc
  33. 12 Apr, 2002 1 commit
  34. 11 Apr, 2002 2 commits
  35. 26 Mar, 2002 1 commit
    • Kevin Bracey's avatar
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E"... · 84335a9f
      Kevin Bracey authored
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E" and "O" modifiers ignored.
      
      * strftime specifiers %c, %X and %x for "C" locale changed to match C99.
      * Optimised hypot[f].
      * Missing hypotf() declaration added to <math.h>.
      * Fixed Shared C Library - inadvertent change to static data size meant it was
        incompatible with the stubs.
      
      Version 5.38. Tagged as 'RISC_OSLib-5_38'
      84335a9f