Skip to content

Commit dce05ef

Browse files
jholSquallATF
andcommitted
sdcc: Added 4.4.0
Co-authored-by: Peiyuan Song <squallatf@gmail.com>
1 parent 1f8434e commit dce05ef

5 files changed

+634
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 23401227cb5fb47bb2b6fbe0407fd811512d4d9d Mon Sep 17 00:00:00 2001
2+
From: Peiyuan Song <squallatf@gmail.com>
3+
Date: Fri, 12 Dec 2025 09:17:51 -0800
4+
Subject: [PATCH 1/4] Resolved conflict between #define B and system headers
5+
6+
regs51.h has pre-processor defines for special purpose registers (SPRs)
7+
of the s51 architecture which includes a "B" SPR.
8+
9+
As a result, regs51.h contains the line:
10+
11+
#define B (0xf0)
12+
13+
Unfortunately, the GCC headers contain function definitions such as this:
14+
15+
__m256bh _mm256_roundscale_pbh (__m256bh __A, int B);
16+
17+
These GCC headers are imported via the winsock2.h.
18+
19+
To prevent collision between the "B" define and usage of "B" in GCC's
20+
headers, this patch includes cmdutil.h early in the file, since
21+
cmdutil.h includes winsock2.h .
22+
---
23+
sim/ucsim/src/sims/s51.src/port.cc | 1 +
24+
1 file changed, 1 insertion(+)
25+
26+
diff --git a/sim/ucsim/src/sims/s51.src/port.cc b/sim/ucsim/src/sims/s51.src/port.cc
27+
index 03ef499f1..7a869e54e 100644
28+
--- a/sim/ucsim/src/sims/s51.src/port.cc
29+
+++ b/sim/ucsim/src/sims/s51.src/port.cc
30+
@@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
31+
32+
// cmd
33+
#include "argcl.h"
34+
+#include "cmdutil.h"
35+
36+
// local
37+
#include "regs51.h"
38+
--
39+
2.52.0
40+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From e8d6db00a2006d49c88d6f0acb45ab7ac2c6b7a4 Mon Sep 17 00:00:00 2001
2+
From: Joel Holdsworth <jholdsworth@nvidia.com>
3+
Date: Fri, 23 Aug 2024 14:05:51 -0700
4+
Subject: [PATCH 2/4] Added missing include of string.h
5+
6+
---
7+
src/SDCCattr.c | 2 ++
8+
1 file changed, 2 insertions(+)
9+
10+
diff --git a/src/SDCCattr.c b/src/SDCCattr.c
11+
index b1194b3a9..6218ba3e0 100644
12+
--- a/src/SDCCattr.c
13+
+++ b/src/SDCCattr.c
14+
@@ -18,6 +18,8 @@
15+
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16+
-------------------------------------------------------------------------*/
17+
18+
+#include <string.h>
19+
+
20+
#include "SDCCattr.h"
21+
#include "SDCCsymt.h"
22+
#include "SDCCutil.h"
23+
--
24+
2.52.0
25+

0 commit comments

Comments
 (0)