From patchwork Tue May 21 09:56:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuriy Kolerov X-Patchwork-Id: 56995 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D33D384AB7D for ; Tue, 21 May 2024 09:58:28 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id EC2A03858D33 for ; Tue, 21 May 2024 09:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC2A03858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC2A03858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716285481; cv=none; b=rsFkGCZ4TJUNhEE6yyYQ/QTMOfeJXyOHIr3tuTLZ6FSRK5uLkpCfKlKev4BzS7wAkQs1mE4+XJVDUTpt2gBLC+2TkGliGymSAOI2ht7wihCClcLAK/P4LNc1qXbWdo76iCY9gOHXNRmMc84qFfg49a19B5xQDxDl+h4k876THew= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716285481; c=relaxed/simple; bh=DjevPI1Ss2madlSYebI+Rap5trod9FP1An7hUAD1J0k=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=a4X6sQK0KU8h+8xD9DMr3jCJjrTRLmiof3xFYOwedFRUQgA0j0GHed3MHP+N6oJQJX98vTG7VmKRGvVaPzTn0/trhld9r2CHp04OzjWkmgyF93IaQdGv3HnGgwXUxi8AFZD95DidMKbd1S3qgBxgXxa+RcP5sWvXpoAC8e8OmBY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2e724bc46bfso24033961fa.3 for ; Tue, 21 May 2024 02:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716285476; x=1716890276; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oNNyQNKiPcOF17GRB7CjiPw6rT5/9IfvJJcwWUru1g8=; b=Ct9GH4lnC+oPiWNADJMnALDNNzke1VBRbU5W88QWe940d5V2CU1mnqfVPkA/UkWJ8C lGTQYeHDdUDzIojRCcnbYcGWYnbwtNGULv9h4G8W19PLd7NHQy/cTBH7QDZF5uzdUTL5 Hix7gjoU5Mt5iUe09RYLSR1vKuHhXjT6VvfB3VN2TKtyg6Z+tIxpDpzoCCygUu7go4py bldtLZ6MVCnkphKUL8L2+xJWaYGG5oc2EfXbwkULEAMyc4FqfisDLCxOEHQgRBpW8Hlo oRP6RFPT6yZgfjbN5WIjfcrhaKQ8HGeP9FZ48Te0Vz5/i1o2/xuMe+rN2wnJT9TuODgm HSWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716285476; x=1716890276; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oNNyQNKiPcOF17GRB7CjiPw6rT5/9IfvJJcwWUru1g8=; b=iSLo/96yvbAqFSuNBhmo4+p11GbGT37D7QaUwtPD1BL40IoEv2h7glHV+y4f2K7iPP BPYYMbO/+UjMBPez5vCqJ1iMrQRCgafSV6RuKAoY35Z72AkGZtKMmATmQNHMuRIFrWXL lV1ZKITM7fshi2VNaFJwlQPDBZS4CPK8SUQv6+KryhBnCfyDXChxHnMgClT6oit6GNjZ GsTHqOy6lQFxLfAptOw7orrpsdAqc7fKpuETwQz/ZIYUtHmc8rbdI7TSoxWmwge6viI+ n644dJ3YOKrtGSLCV4OZDCCiupco5tskD+ZVdPRObZ1DG8NfganGHKI7XWl7lwY0lWvE a19Q== X-Gm-Message-State: AOJu0Yx163ecLuGdiOegi/pzyU+A9MCQrM6GsBtYt7EA+e2Fw5L6oA/l jdmvwTMFlJcXim0M+VVq17jtdbIiW7tG1ikGNbQBbwzc5b50t5Mhy8q40L/5KAQ= X-Google-Smtp-Source: AGHT+IHIsmLExHOgo0W3ImFeOsnPzWCIClZd/qvjAdFCSfnjxhrSvBXqRHgG8k680gOE+ep+mLtmRw== X-Received: by 2002:a2e:a315:0:b0:2e6:f556:48a5 with SMTP id 38308e7fff4ca-2e6f5564bc2mr111661761fa.19.1716285475536; Tue, 21 May 2024 02:57:55 -0700 (PDT) Received: from localhost.localdomain ([2a00:a041:e626:f00:a285:867a:5e98:7729]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f87b2653bsm490773635e9.4.2024.05.21.02.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:57:54 -0700 (PDT) From: kolerov93@gmail.com To: newlib@sourceware.org Cc: shahab@synopsys.com, claziss@gmail.com, Yuriy Kolerov Subject: [PATCH 00/15] A series of fixes for ARC and libgloss update Date: Tue, 21 May 2024 10:56:43 +0100 Message-Id: <20240521095658.10311-1-kolerov93@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces+patchwork=sourceware.org@sourceware.org From: Yuriy Kolerov This a series of patches for Synopsys ARC port that have accumulated over the past years. It contains several small fixes and a significant update of libgloss for all supported boards for ARC targets: IoT Development Kit, HS Development Kit, EM SDP and EM Starter Kit. Claudiu Zissulescu (3): arc: libgloss: Use long calls attribute for exit_halt arc: libc: Add support of 16-entry register file arc: libgloss: Use atexit to setup fini routines Luis Silva (1): arc: libgloss: Use fstat call instead of stat for nSIM Shahab Vahedi (1): arc: libc: Record r58/r59 in long-jump's buffer Vladimir Isaev (1): arc: libgloss: Introduce hostlink interface Yuriy Kolerov (9): arc: libc,libgloss: Remove .file directive from .S files arc: libgloss: Clean registers before any use arc: libgloss: Add UART 8250 library arc: libgloss: Add a linker script common for all boards arc: libgloss: Add support of IoT Development Kit board arc: libgloss: Add support of HS Development Kit board arc: libgloss: Add support of EM SDP board arc: libgloss: Add support of EM Starter Kit board arc: libgloss: Add build rules for new boards libgloss/Makefile.in | 1216 +++++++++++++++----- libgloss/arc/Makefile.inc | 92 +- libgloss/arc/arc-main-helper.c | 73 ++ libgloss/arc/arc-timer.c | 129 +++ libgloss/arc/arc-timer.h | 25 + libgloss/arc/arcv2elf-common.ld | 233 ++++ libgloss/arc/crt0.S | 93 +- libgloss/arc/emsdp-uart-setup.c | 32 + libgloss/arc/emsdp1.1.ld | 15 + libgloss/arc/emsdp1.1.specs | 18 + libgloss/arc/emsdp1.1_ram.ld | 15 + libgloss/arc/emsdp1.1_ram.specs | 18 + libgloss/arc/emsdp1.2.ld | 15 + libgloss/arc/emsdp1.2.specs | 18 + libgloss/arc/emsdp1.2_ram.ld | 15 + libgloss/arc/emsdp1.2_ram.specs | 18 + libgloss/arc/emsk-uart-setup.c | 33 + libgloss/arc/emsk1_em4.ld | 14 + libgloss/arc/emsk1_em4.specs | 18 + libgloss/arc/emsk1_em6.ld | 14 + libgloss/arc/emsk1_em6.specs | 18 + libgloss/arc/emsk1_em6_ram.ld | 14 + libgloss/arc/emsk1_em6_ram.specs | 18 + libgloss/arc/emsk2.1_em5d.ld | 14 + libgloss/arc/emsk2.1_em5d.specs | 18 + libgloss/arc/emsk2.1_em7d.ld | 15 + libgloss/arc/emsk2.1_em7d.specs | 18 + libgloss/arc/emsk2.1_em7d_ram.ld | 15 + libgloss/arc/emsk2.1_em7d_ram.specs | 18 + libgloss/arc/emsk2.2_em11d.ld | 15 + libgloss/arc/emsk2.2_em11d.specs | 18 + libgloss/arc/emsk2.2_em11d_ram.ld | 15 + libgloss/arc/emsk2.2_em11d_ram.specs | 18 + libgloss/arc/emsk2.2_em7d.ld | 15 + libgloss/arc/emsk2.2_em7d.specs | 18 + libgloss/arc/emsk2.2_em7d_ram.ld | 15 + libgloss/arc/emsk2.2_em7d_ram.specs | 18 + libgloss/arc/emsk2.2_em9d.ld | 15 + libgloss/arc/emsk2.2_em9d.specs | 18 + libgloss/arc/emsk2.2_em9d_ram.ld | 15 + libgloss/arc/emsk2.2_em9d_ram.specs | 18 + libgloss/arc/hl-setup.c | 27 + libgloss/arc/hl-stub.c | 81 ++ libgloss/arc/hl.specs | 14 + libgloss/arc/hl/hl_api.c | 350 ++++++ libgloss/arc/hl/hl_api.h | 77 ++ libgloss/arc/hl/hl_argc.c | 45 + libgloss/arc/hl/hl_argv.c | 67 ++ libgloss/arc/hl/hl_clock.c | 87 ++ libgloss/arc/hl/hl_close.c | 58 + libgloss/arc/hl/hl_exit.c | 42 + libgloss/arc/hl/hl_fstat.c | 95 ++ libgloss/arc/hl/hl_gettimeofday.c | 69 ++ libgloss/arc/hl/hl_gw.c | 180 +++ libgloss/arc/hl/hl_gw.h | 46 + libgloss/arc/hl/hl_isatty.c | 64 ++ libgloss/arc/hl/hl_lseek.c | 68 ++ libgloss/arc/hl/hl_open.c | 89 ++ libgloss/arc/hl/hl_read.c | 105 ++ libgloss/arc/hl/hl_toolchain.h | 53 + libgloss/arc/hl/hl_unlink.c | 59 + libgloss/arc/hl/hl_write.c | 97 ++ libgloss/arc/hsdk-uart-setup.c | 32 + libgloss/arc/hsdk.ld | 13 + libgloss/arc/hsdk.specs | 18 + libgloss/arc/iotdk-uart-setup.c | 36 + libgloss/arc/iotdk.ld | 14 + libgloss/arc/iotdk.specs | 18 + libgloss/arc/libcfunc.c | 6 +- libgloss/arc/nsim-syscalls.c | 6 +- libgloss/arc/readme-hostlink.md | 90 ++ libgloss/arc/uart-8250-stub.c | 116 ++ libgloss/arc/uart-8250.c | 316 +++++ libgloss/arc/uart-8250.h | 25 + newlib/libc/include/machine/setjmp.h | 2 +- newlib/libc/machine/arc/memcmp-bs-norm.S | 5 +- newlib/libc/machine/arc/memcmp-stub.c | 5 +- newlib/libc/machine/arc/memcmp.S | 5 +- newlib/libc/machine/arc/memcpy-archs.S | 5 +- newlib/libc/machine/arc/memcpy-bs.S | 5 +- newlib/libc/machine/arc/memcpy-stub.c | 5 +- newlib/libc/machine/arc/memcpy.S | 5 +- newlib/libc/machine/arc/memset-archs.S | 5 +- newlib/libc/machine/arc/memset-bs.S | 5 +- newlib/libc/machine/arc/memset-stub.c | 5 +- newlib/libc/machine/arc/memset.S | 5 +- newlib/libc/machine/arc/setjmp.S | 28 +- newlib/libc/machine/arc/strchr-bs-norm.S | 5 +- newlib/libc/machine/arc/strchr-bs.S | 5 +- newlib/libc/machine/arc/strchr-stub.c | 5 +- newlib/libc/machine/arc/strcmp-archs.S | 5 +- newlib/libc/machine/arc/strcmp-stub.c | 5 +- newlib/libc/machine/arc/strcmp.S | 5 +- newlib/libc/machine/arc/strcpy-bs-arc600.S | 5 +- newlib/libc/machine/arc/strcpy-bs.S | 5 +- newlib/libc/machine/arc/strcpy-stub.c | 5 +- newlib/libc/machine/arc/strcpy.S | 5 +- newlib/libc/machine/arc/strlen-bs-norm.S | 5 +- newlib/libc/machine/arc/strlen-bs.S | 5 +- newlib/libc/machine/arc/strlen-stub.c | 5 +- newlib/libc/machine/arc/strlen.S | 5 +- newlib/libc/machine/arc/strncpy-bs.S | 5 +- newlib/libc/machine/arc/strncpy-stub.c | 5 +- newlib/libc/machine/arc/strncpy.S | 5 +- 104 files changed, 4712 insertions(+), 371 deletions(-) create mode 100644 libgloss/arc/arc-main-helper.c create mode 100644 libgloss/arc/arc-timer.c create mode 100644 libgloss/arc/arc-timer.h create mode 100644 libgloss/arc/arcv2elf-common.ld create mode 100644 libgloss/arc/emsdp-uart-setup.c create mode 100644 libgloss/arc/emsdp1.1.ld create mode 100644 libgloss/arc/emsdp1.1.specs create mode 100644 libgloss/arc/emsdp1.1_ram.ld create mode 100644 libgloss/arc/emsdp1.1_ram.specs create mode 100644 libgloss/arc/emsdp1.2.ld create mode 100644 libgloss/arc/emsdp1.2.specs create mode 100644 libgloss/arc/emsdp1.2_ram.ld create mode 100644 libgloss/arc/emsdp1.2_ram.specs create mode 100644 libgloss/arc/emsk-uart-setup.c create mode 100644 libgloss/arc/emsk1_em4.ld create mode 100644 libgloss/arc/emsk1_em4.specs create mode 100644 libgloss/arc/emsk1_em6.ld create mode 100644 libgloss/arc/emsk1_em6.specs create mode 100644 libgloss/arc/emsk1_em6_ram.ld create mode 100644 libgloss/arc/emsk1_em6_ram.specs create mode 100644 libgloss/arc/emsk2.1_em5d.ld create mode 100644 libgloss/arc/emsk2.1_em5d.specs create mode 100644 libgloss/arc/emsk2.1_em7d.ld create mode 100644 libgloss/arc/emsk2.1_em7d.specs create mode 100644 libgloss/arc/emsk2.1_em7d_ram.ld create mode 100644 libgloss/arc/emsk2.1_em7d_ram.specs create mode 100644 libgloss/arc/emsk2.2_em11d.ld create mode 100644 libgloss/arc/emsk2.2_em11d.specs create mode 100644 libgloss/arc/emsk2.2_em11d_ram.ld create mode 100644 libgloss/arc/emsk2.2_em11d_ram.specs create mode 100644 libgloss/arc/emsk2.2_em7d.ld create mode 100644 libgloss/arc/emsk2.2_em7d.specs create mode 100644 libgloss/arc/emsk2.2_em7d_ram.ld create mode 100644 libgloss/arc/emsk2.2_em7d_ram.specs create mode 100644 libgloss/arc/emsk2.2_em9d.ld create mode 100644 libgloss/arc/emsk2.2_em9d.specs create mode 100644 libgloss/arc/emsk2.2_em9d_ram.ld create mode 100644 libgloss/arc/emsk2.2_em9d_ram.specs create mode 100644 libgloss/arc/hl-setup.c create mode 100644 libgloss/arc/hl-stub.c create mode 100644 libgloss/arc/hl.specs create mode 100644 libgloss/arc/hl/hl_api.c create mode 100644 libgloss/arc/hl/hl_api.h create mode 100644 libgloss/arc/hl/hl_argc.c create mode 100644 libgloss/arc/hl/hl_argv.c create mode 100644 libgloss/arc/hl/hl_clock.c create mode 100644 libgloss/arc/hl/hl_close.c create mode 100644 libgloss/arc/hl/hl_exit.c create mode 100644 libgloss/arc/hl/hl_fstat.c create mode 100644 libgloss/arc/hl/hl_gettimeofday.c create mode 100644 libgloss/arc/hl/hl_gw.c create mode 100644 libgloss/arc/hl/hl_gw.h create mode 100644 libgloss/arc/hl/hl_isatty.c create mode 100644 libgloss/arc/hl/hl_lseek.c create mode 100644 libgloss/arc/hl/hl_open.c create mode 100644 libgloss/arc/hl/hl_read.c create mode 100644 libgloss/arc/hl/hl_toolchain.h create mode 100644 libgloss/arc/hl/hl_unlink.c create mode 100644 libgloss/arc/hl/hl_write.c create mode 100644 libgloss/arc/hsdk-uart-setup.c create mode 100644 libgloss/arc/hsdk.ld create mode 100644 libgloss/arc/hsdk.specs create mode 100644 libgloss/arc/iotdk-uart-setup.c create mode 100644 libgloss/arc/iotdk.ld create mode 100644 libgloss/arc/iotdk.specs create mode 100644 libgloss/arc/readme-hostlink.md create mode 100644 libgloss/arc/uart-8250-stub.c create mode 100644 libgloss/arc/uart-8250.c create mode 100644 libgloss/arc/uart-8250.h