New patches

This commit is contained in:
Xavier ASUS 2019-10-29 23:24:57 +01:00
parent 6c58ed406a
commit fb0ec94420
10 changed files with 78 additions and 14 deletions

View File

@ -1,7 +1,7 @@
From 22cbcafce0c08683209fe1bba2b7faef111764d4 Mon Sep 17 00:00:00 2001
From: Ake Rehnman <ake_rehnman_at_gmail_com>
Date: Fri, 24 Feb 2017 11:51:54 +0100
Subject: [PATCH 1/8] First commit for stm8-binutils-gdb
Subject: [PATCH 1/10] First commit for stm8-binutils-gdb
# Conflicts:
# bfd/archures.c
@ -4890,4 +4890,3 @@ index 0000000000..3a600d66d3
+}
--
2.12.2

View File

@ -1,7 +1,7 @@
From 613571635409f08c9eb0460e011616dd16250ecb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85ke=20Rehnman?= <ake_rehnman_at_gmail_com>
Date: Sat, 4 Mar 2017 00:06:10 +0100
Subject: [PATCH 2/8] added clear_proceed_status in run_command_1 causing run
Subject: [PATCH 2/10] added clear_proceed_status in run_command_1 causing run
command to hang.
---
@ -22,4 +22,3 @@ index 976276b694..2050634c29 100644
/* Since there was no error, there's no need to finish the thread
--
2.12.2

View File

@ -1,7 +1,7 @@
From a98428b14d141be893403aa7c7935012aef1f8e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85ke=20Rehnman?= <ake_rehnman_at_gmail_com>
Date: Sat, 4 Mar 2017 23:47:44 +0100
Subject: [PATCH 3/8] Changed the run functionality to mimic running native
Subject: [PATCH 3/10] Changed the run functionality to mimic running native
code.
In addition two new remote settings were added to facilitate debugging with
@ -127,4 +127,3 @@ index a426508723..208bf4609b 100644
Argument is a single section name (default: all loaded sections).\n\
--
2.12.2

View File

@ -1,7 +1,7 @@
From 85f95b1d46d4ab7bff529f9f0de5cc3263a205bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85ke=20Rehnman?= <ake_rehnman_at_gmail_com>
Date: Sun, 23 Apr 2017 21:26:53 +0200
Subject: [PATCH 4/8] Added --debug option to gas to enable debugging printout
Subject: [PATCH 4/10] Added --debug option to gas to enable debugging printout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -177,4 +177,3 @@ index 84e667278e..1fa4503ce2 100644
{
--
2.12.2

View File

@ -1,7 +1,7 @@
From c5d6641a345485cab823426a5b364a8126e7eda3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85ke=20Rehnman?= <ake_rehnman_at_gmail_com>
Date: Sun, 23 Apr 2017 21:30:18 +0200
Subject: [PATCH 5/8] Fixed printf formatting warnings Removed target
Subject: [PATCH 5/10] Fixed printf formatting warnings Removed target
description registers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@ -171,4 +171,3 @@ index 30b345cfd7..fd4b96c6c0 100644
{
--
2.12.2

View File

@ -1,7 +1,7 @@
From 3447c315a86e833246c70404af4b6f6946751b45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85ke=20Rehnman?= <ake_rehnman_at_gmail_com>
Date: Sat, 3 Mar 2018 10:54:22 +0100
Subject: [PATCH 6/8] Numerous changes and bug fixes
Subject: [PATCH 6/10] Numerous changes and bug fixes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -1667,4 +1667,3 @@ index 3a600d66d3..9516d859f2 100644
int i;
--
2.12.2

View File

@ -1,7 +1,7 @@
From 69776a7af5b7a3697c5d32f3265d2a8de8cb5b32 Mon Sep 17 00:00:00 2001
From: Xavier ASUS <xavi92psx@gmail.com>
Date: Tue, 29 Oct 2019 00:43:05 +0100
Subject: [PATCH 7/8] Added --gc-sections and hi8/lo8/hh8
Subject: [PATCH 7/10] Added --gc-sections and hi8/lo8/hh8
---
bfd/elf32-stm8.c | 229 ++++++++++++++++++++++++----

View File

@ -1,7 +1,7 @@
From 1c7438a0330f4187e122e97b4592f9187cf49bcd Mon Sep 17 00:00:00 2001
From: Xavier ASUS <xavi92psx@gmail.com>
Date: Tue, 29 Oct 2019 01:15:40 +0100
Subject: [PATCH 8/8] Add STM8 reloc ops by default
Subject: [PATCH 8/10] Add STM8 reloc ops by default
---
bfd/bfd-in2.h | 7 +++++++

View File

@ -0,0 +1,26 @@
From 384f13a86da9f462b9a4dfb48407b48461d8a837 Mon Sep 17 00:00:00 2001
From: Xavier ASUS <xavi92psx@gmail.com>
Date: Tue, 29 Oct 2019 23:16:22 +0100
Subject: [PATCH 9/10] Fixed typo in STM8 opcode list definition
---
opcodes/stm8-opc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/opcodes/stm8-opc.c b/opcodes/stm8-opc.c
index d16e7b60..3a9397a1 100644
--- a/opcodes/stm8-opc.c
+++ b/opcodes/stm8-opc.c
@@ -240,8 +240,8 @@ const struct stm8_opcodes_s stm8_opcodes[] =
{"cpl", {ST8_LONGPTRW_X}, 0x7263},
{"cpl", {ST8_SHORTPTRW_Y}, 0x9163},
//cplw
-{"clrw", {ST8_REG_X}, 0x53},
-{"clrw", {ST8_REG_Y}, 0x9053},
+{"cplw", {ST8_REG_X}, 0x53},
+{"cplw", {ST8_REG_Y}, 0x9053},
//dec
{"dec", {ST8_REG_A}, 0x4A},
{"dec", {ST8_SHORTMEM}, 0x3A},
--
2.17.1

View File

@ -0,0 +1,44 @@
From cc54a1037caf9f5ab4b5cd5795f1d5b7e2ceb68d Mon Sep 17 00:00:00 2001
From: Xavier ASUS <xavi92psx@gmail.com>
Date: Tue, 29 Oct 2019 23:16:48 +0100
Subject: [PATCH 10/10] Replaced C99 code with ANSI C equivalent
---
opcodes/stm8-dis.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/opcodes/stm8-dis.c b/opcodes/stm8-dis.c
index 906b8370..d1969f44 100644
--- a/opcodes/stm8-dis.c
+++ b/opcodes/stm8-dis.c
@@ -379,6 +379,8 @@ int stm8_dis(bfd_vma addr, unsigned int op)
{
if (op == stm8_opcodes[i].bin_opcode)
{
+ int curr_operand;
+
dinfo->fprintf_func(dinfo->stream, "%s",stm8_opcodes[i].name);
operandlen = stm8_compute_insn_size(stm8_opcodes[i])-stm8_opcode_size(op);
instrlen += operandlen;
@@ -388,8 +390,9 @@ int stm8_dis(bfd_vma addr, unsigned int op)
lastlabeladdr = 0;
c = ' ';
- for (int curr_operand = 0; curr_operand < stm8_num_opcode_operands(stm8_opcodes[i]); curr_operand++)
+ for (curr_operand = 0; curr_operand < stm8_num_opcode_operands(stm8_opcodes[i]); curr_operand++)
{
+ int j;
bufp = buf;
dir = 1;
operand = 0;
@@ -401,7 +404,7 @@ int stm8_dis(bfd_vma addr, unsigned int op)
operand = stm8_num_opcode_operands(stm8_opcodes[i]) - 1;
}
- for (int j = 0; j < stm8_num_opcode_operands(stm8_opcodes[i]); j++, operand += dir)
+ for (j = 0; j < stm8_num_opcode_operands(stm8_opcodes[i]); j++, operand += dir)
{
s[0] = 0;
bufp += stm8_operands(s, bufp, stm8_opcodes[i].constraints[operand]);
--
2.17.1