From 1d29bb0408506480e13afeca2ec6b8611e6a0ce7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 24 Aug 2018 18:15:04 +0000 Subject: runtime: remove the dummy arg of getcallersp This is a port of https://golang.org/cl/109596 to the gofrontend, in preparation for updating libgo to 1.11. Original CL description: getcallersp is intrinsified, and so the dummy arg is no longer needed. Remove it, as well as a few dummy args that are solely to feed getcallersp. Reviewed-on: https://go-review.googlesource.com/131116 From-SVN: r263840 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 51098e7..8fc3878 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -274c88df4d6f9360dcd657b6e069a3b5a1d37a90 +8deaafd14414bb5cbbdf3e2673f61b6d836d7d2a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 2c2ae1c..143f0a7 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9635,13 +9635,9 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, "__builtin_return_address", 0); } - else if (this->args_ != NULL - && this->args_->size() == 1 + else if ((this->args_ == NULL || this->args_->size() == 0) && n == "getcallersp") { - // The actual argument to getcallersp is always the - // address of a parameter; we don't need that for the - // GCC builtin function, so we just ignore it. static Named_object* builtin_frame_address; return this->lower_to_builtin(&builtin_frame_address, "__builtin_frame_address", -- cgit v1.1