Changeset 56210a7 in mainline


Ignore:
Timestamp:
2025-01-29T13:06:25Z (3 weeks ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
a796812c
Parents:
1fa6292
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:04:40)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:06:25)
Message:

Update GCC and binutils to latest versions

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/riscv64/src/asm.S

    r1fa6292 r56210a7  
    108108        or t0, t0, t1
    109109
    110         csrw sptbr, t0
     110        csrw satp, t0
    111111
    112112        /* Jump to supervisor mode */
  • kernel/arch/riscv64/src/mm/page.c

    r1fa6292 r56210a7  
    8585
    8686        asm volatile (
    87             "csrw sptbr, %[satp]\n"
    88             :: [satp] "r" (satp)
     87            "csrw satp, %[satpv]\n"
     88            :: [satpv] "r" (satp)
    8989        );
    9090}
  • tools/toolchain.sh

    r1fa6292 r56210a7  
    3131BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git"
    3232
    33 BINUTILS_BRANCH="binutils-2_41-helenos"
    34 BINUTILS_VERSION="2.41"
     33BINUTILS_BRANCH="binutils-2_43-helenos"
     34BINUTILS_VERSION="2.43"
    3535
    3636GDB_BRANCH="gdb-13.2-helenos"
     
    3838
    3939GCC_GIT="https://github.com/HelenOS/gcc.git"
    40 GCC_BRANCH="13_2_0-helenos"
    41 GCC_VERSION="13.2"
     40GCC_BRANCH="14_2_0-helenos"
     41GCC_VERSION="14.2"
    4242
    4343BASEDIR="$PWD"
     
    419419                --enable-languages=c,c++,go \
    420420                --enable-lto \
     421                --enable-obsolete \
    421422                --disable-shared \
    422423                --disable-werror \
  • uspace/drv/block/virtio-blk/virtio-blk.c

    r1fa6292 r56210a7  
    365365        }
    366366
    367         vdev->queues = calloc(sizeof(virtq_t), num_queues);
     367        vdev->queues = calloc(num_queues, sizeof(virtq_t));
    368368        if (!vdev->queues) {
    369369                rc = ENOMEM;
  • uspace/drv/nic/virtio-net/virtio-net.c

    r1fa6292 r56210a7  
    221221        }
    222222
    223         vdev->queues = calloc(sizeof(virtq_t), num_queues);
     223        vdev->queues = calloc(num_queues, sizeof(virtq_t));
    224224        if (!vdev->queues) {
    225225                rc = ENOMEM;
  • uspace/lib/c/arch/arm32/src/atomic.c

    r1fa6292 r56210a7  
    8686}
    8787
     88unsigned char __atomic_exchange_1(volatile void *mem0, unsigned char val,
     89    int model)
     90{
     91        volatile unsigned char *mem = mem0;
     92
     93        (void) model;
     94
     95        unsigned ret;
     96
     97        /*
     98         * The following instructions between labels 1 and 2 constitute a
     99         * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
     100         * the kernel will restart it.
     101         */
     102        asm volatile (
     103            "1:\n"
     104            "   adr %[ret], 1b\n"
     105            "   str %[ret], %[rp0]\n"
     106            "   adr %[ret], 2f\n"
     107            "   str %[ret], %[rp1]\n"
     108            "   ldrb %[ret], %[addr]\n"
     109            "   strb %[imm], %[addr]\n"
     110            "2:\n"
     111            : [ret] "=&r" (ret),
     112              [rp0] "=m" (ras_page[0]),
     113              [rp1] "=m" (ras_page[1]),
     114              [addr] "+m" (*mem)
     115            : [imm] "r" (val)
     116        );
     117
     118        ras_page[0] = 0;
     119        ras_page[1] = 0xffffffff;
     120
     121        return ret;
     122}
     123
     124unsigned short __atomic_exchange_2(volatile void *mem0, unsigned short val,
     125    int model)
     126{
     127        volatile unsigned short *mem = mem0;
     128
     129        (void) model;
     130
     131        unsigned ret;
     132
     133        /*
     134         * The following instructions between labels 1 and 2 constitute a
     135         * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
     136         * the kernel will restart it.
     137         */
     138        asm volatile (
     139            "1:\n"
     140            "   adr %[ret], 1b\n"
     141            "   str %[ret], %[rp0]\n"
     142            "   adr %[ret], 2f\n"
     143            "   str %[ret], %[rp1]\n"
     144            "   ldrh %[ret], %[addr]\n"
     145            "   strh %[imm], %[addr]\n"
     146            "2:\n"
     147            : [ret] "=&r" (ret),
     148              [rp0] "=m" (ras_page[0]),
     149              [rp1] "=m" (ras_page[1]),
     150              [addr] "+m" (*mem)
     151            : [imm] "r" (val)
     152        );
     153
     154        ras_page[0] = 0;
     155        ras_page[1] = 0xffffffff;
     156
     157        return ret;
     158}
     159
     160unsigned __atomic_exchange_4(volatile void *mem0, unsigned val, int model)
     161{
     162        volatile unsigned *mem = mem0;
     163
     164        (void) model;
     165
     166        unsigned ret;
     167
     168        /*
     169         * The following instructions between labels 1 and 2 constitute a
     170         * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
     171         * the kernel will restart it.
     172         */
     173        asm volatile (
     174            "1:\n"
     175            "   adr %[ret], 1b\n"
     176            "   str %[ret], %[rp0]\n"
     177            "   adr %[ret], 2f\n"
     178            "   str %[ret], %[rp1]\n"
     179            "   ldr %[ret], %[addr]\n"
     180            "   str %[imm], %[addr]\n"
     181            "2:\n"
     182            : [ret] "=&r" (ret),
     183              [rp0] "=m" (ras_page[0]),
     184              [rp1] "=m" (ras_page[1]),
     185              [addr] "+m" (*mem)
     186            : [imm] "r" (val)
     187        );
     188
     189        ras_page[0] = 0;
     190        ras_page[1] = 0xffffffff;
     191
     192        return ret;
     193}
     194
    88195unsigned short __atomic_fetch_add_2(volatile void *mem0, unsigned short val,
    89196    int model)
     
    164271}
    165272
     273bool __atomic_test_and_set(volatile void *ptr, int memorder)
     274{
     275        volatile unsigned char *b = ptr;
     276
     277        unsigned char orig = __atomic_exchange_n(b, (unsigned char) true, memorder);
     278        return orig != 0;
     279}
     280
    166281void __sync_synchronize(void)
    167282{
  • uspace/lib/cpp/include/__bits/io/ios.hpp

    r1fa6292 r56210a7  
    403403                delete[] parray_;
    404404                parray_size_ = rhs.parray_size_;
    405                 parray_ = new long[parray_size_];
     405                parray_ = new void *[parray_size_];
    406406
    407407                for (size_t i = 0; i < parray_size_; ++i)
  • uspace/lib/trackmod/protracker.c

    r1fa6292 r56210a7  
    146146
    147147        cells = module->channels * protracker_pattern_rows;
    148         buf = calloc(sizeof(uint32_t), cells);
     148        buf = calloc(cells, sizeof(uint32_t));
    149149
    150150        if (buf == NULL) {
     
    156156                module->pattern[i].rows = protracker_pattern_rows;
    157157                module->pattern[i].channels = module->channels;
    158                 module->pattern[i].data = calloc(sizeof(trackmod_cell_t), cells);
     158                module->pattern[i].data = calloc(cells, sizeof(trackmod_cell_t));
    159159                if (module->pattern[i].data == NULL) {
    160160                        rc = ENOMEM;
     
    326326
    327327        module->instrs = samples;
    328         module->instr = calloc(sizeof(trackmod_instr_t), samples);
     328        module->instr = calloc(samples, sizeof(trackmod_instr_t));
    329329        if (module->instr == NULL) {
    330330                printf("Out of memory.\n");
     
    334334
    335335        module->patterns = patterns;
    336         module->pattern = calloc(sizeof(trackmod_pattern_t), patterns);
     336        module->pattern = calloc(patterns, sizeof(trackmod_pattern_t));
    337337        if (module->pattern == NULL) {
    338338                printf("Out of memory.\n");
     
    343343        /* Order list */
    344344        module->ord_list_len = order_list->order_list_len;
    345         module->ord_list = calloc(sizeof(size_t), module->ord_list_len);
     345        module->ord_list = calloc(module->ord_list_len, sizeof(size_t));
    346346        if (module->ord_list == NULL) {
    347347                printf("Out of memory.\n");
  • uspace/lib/trackmod/xm.c

    r1fa6292 r56210a7  
    6666        }
    6767
    68         module->ord_list = calloc(sizeof(size_t), module->ord_list_len);
     68        module->ord_list = calloc(module->ord_list_len, sizeof(size_t));
    6969        if (module->ord_list == NULL) {
    7070                printf("Out of memory.\n");
     
    176176        int ret;
    177177
    178         module->pattern = calloc(sizeof(trackmod_pattern_t), module->patterns);
     178        module->pattern = calloc(module->patterns, sizeof(trackmod_pattern_t));
    179179        if (module->pattern == NULL) {
    180180                rc = ENOMEM;
     
    208208                module->pattern[i].rows = rows;
    209209                module->pattern[i].channels = module->channels;
    210                 module->pattern[i].data = calloc(sizeof(trackmod_cell_t),
    211                     rows * module->channels);
     210                module->pattern[i].data = calloc(rows * module->channels,
     211                    sizeof(trackmod_cell_t));
    212212
    213213                if (module->pattern[i].data == NULL) {
  • uspace/srv/vfs/vfs_register.c

    r1fa6292 r56210a7  
    369369        }
    370370
    371         fstypes->fstypes = calloc(sizeof(char *), count);
     371        fstypes->fstypes = calloc(count, sizeof(char *));
    372372        if (fstypes->fstypes == NULL) {
    373373                free(fstypes->buf);
Note: See TracChangeset for help on using the changeset viewer.