+++ /dev/null
-Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
-MIPS16 functions have a static assembler prologue which clobbers
-registers v0 and v1. Add these register clobbers to function call
-instructions.
-
---- a/gcc/config/mips/mips.cc
-+++ b/gcc/config/mips/mips.cc
-@@ -3134,6 +3134,12 @@ mips_emit_call_insn (rtx pattern, rtx or
- emit_insn (gen_update_got_version ());
- }
-
-+ if (TARGET_MIPS16 && TARGET_USE_GOT)
-+ {
-+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
-+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
-+ }
-+
- if (TARGET_MIPS16
- && TARGET_EXPLICIT_RELOCS
- && TARGET_CALL_CLOBBERED_GP)
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
-@@ -20228,7 +20228,7 @@ mips_option_override (void)
+@@ -20222,7 +20222,7 @@ mips_option_override (void)
flag_pcc_struct_return = 0;
/* Decide which rtx_costs structure to use. */
libcody/server.cc | 28 ++++++++++++++--------------
3 files changed, 55 insertions(+), 31 deletions(-)
-diff --git a/libcody/client.cc b/libcody/client.cc
-index ae69d190cb7..147fecdbe50 100644
--- a/libcody/client.cc
+++ b/libcody/client.cc
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
e.append (strerror (err));
return Packet (Client::PC_ERROR, std::move (e));
-@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vec
{
if (e == EINVAL)
{
result.GetString () = std::move (msg);
}
else if (result.GetCode () == Client::PC_CONNECT)
-@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agen
size_t alen, size_t ilen)
{
write.BeginLine ();
write.AppendInteger (Version);
write.AppendWord (agent, true, alen);
write.AppendWord (ident, true, ilen);
-@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agen
// HELLO $version $agent [$flags]
Packet ConnectResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_PATHNAME, std::move (words[1]));
return Packet (Client::PC_ERROR, u8"");
-@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std::string> &words)
+@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std
// OK or ERROR
Packet OKResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_OK);
else
return Packet (Client::PC_ERROR,
-@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen)
+@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char co
// PATHNAME $cmifile
Packet IncludeTranslateResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_BOOL, 1);
else
return Packet (Client::PC_ERROR, u8"");
-diff --git a/libcody/cody.hh b/libcody/cody.hh
-index 789ce9e70b7..93bce93aa94 100644
--- a/libcody/cody.hh
+++ b/libcody/cody.hh
@@ -47,12 +47,21 @@ namespace Detail {
Packet (unsigned c, std::vector<std::string> &&v)
: vector (std::move (v)), cat (VECTOR), code (c)
{
-diff --git a/libcody/server.cc b/libcody/server.cc
-index e2fa069bb93..c18469fae84 100644
--- a/libcody/server.cc
+++ b/libcody/server.cc
@@ -36,12 +36,12 @@ static RequestPair
msg.append (strerror (err));
}
resolver->ErrorResponse (this, std::move (msg));
-@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Res
return nullptr;
if (words.size () == 3)
unsigned version = ParseUnsigned (words[1]);
if (version == ~0u)
return nullptr;
---
-2.53.0
-
libcody/server.cc | 28 ++++++++++++++--------------
3 files changed, 55 insertions(+), 31 deletions(-)
-diff --git a/libcody/client.cc b/libcody/client.cc
-index ae69d190cb7..147fecdbe50 100644
--- a/libcody/client.cc
+++ b/libcody/client.cc
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
e.append (strerror (err));
return Packet (Client::PC_ERROR, std::move (e));
-@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vec
{
if (e == EINVAL)
{
result.GetString () = std::move (msg);
}
else if (result.GetCode () == Client::PC_CONNECT)
-@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agen
size_t alen, size_t ilen)
{
write.BeginLine ();
write.AppendInteger (Version);
write.AppendWord (agent, true, alen);
write.AppendWord (ident, true, ilen);
-@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agen
// HELLO $version $agent [$flags]
Packet ConnectResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_PATHNAME, std::move (words[1]));
return Packet (Client::PC_ERROR, u8"");
-@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std::string> &words)
+@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std
// OK or ERROR
Packet OKResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_OK);
else
return Packet (Client::PC_ERROR,
-@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen)
+@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char co
// PATHNAME $cmifile
Packet IncludeTranslateResponse (std::vector<std::string> &words)
{
return Packet (Client::PC_BOOL, 1);
else
return Packet (Client::PC_ERROR, u8"");
-diff --git a/libcody/cody.hh b/libcody/cody.hh
-index 789ce9e70b7..93bce93aa94 100644
--- a/libcody/cody.hh
+++ b/libcody/cody.hh
@@ -47,12 +47,21 @@ namespace Detail {
Packet (unsigned c, std::vector<std::string> &&v)
: vector (std::move (v)), cat (VECTOR), code (c)
{
-diff --git a/libcody/server.cc b/libcody/server.cc
-index e2fa069bb93..c18469fae84 100644
--- a/libcody/server.cc
+++ b/libcody/server.cc
@@ -36,12 +36,12 @@ static RequestPair
msg.append (strerror (err));
}
resolver->ErrorResponse (this, std::move (msg));
-@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Res
return nullptr;
if (words.size () == 3)
unsigned version = ParseUnsigned (words[1]);
if (version == ~0u)
return nullptr;
---
-2.53.0
-
+++ /dev/null
-Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
-MIPS16 functions have a static assembler prologue which clobbers
-registers v0 and v1. Add these register clobbers to function call
-instructions.
-
---- a/gcc/config/mips/mips.cc
-+++ b/gcc/config/mips/mips.cc
-@@ -3293,6 +3293,12 @@ mips_emit_call_insn (rtx pattern, rtx or
- emit_insn (gen_update_got_version ());
- }
-
-+ if (TARGET_MIPS16 && TARGET_USE_GOT)
-+ {
-+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
-+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
-+ }
-+
- if (TARGET_MIPS16
- && TARGET_EXPLICIT_RELOCS
- && TARGET_CALL_CLOBBERED_GP)
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
-@@ -20605,7 +20605,7 @@ mips_option_override (void)
+@@ -20599,7 +20599,7 @@ mips_option_override (void)
flag_pcc_struct_return = 0;
/* Decide which rtx_costs structure to use. */