Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/833333/?format=api
{ "id": 833333, "url": "http://patchwork.ozlabs.org/api/1.2/patches/833333/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/1509625835-22344-3-git-send-email-claziss@synopsys.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1509625835-22344-3-git-send-email-claziss@synopsys.com>", "list_archive_url": null, "date": "2017-11-02T12:30:31", "name": "[2/6,ARC] Add SJLI support.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d400154bc8f88bd79b631f882ca50b635e2068c7", "submitter": { "id": 67086, "url": "http://patchwork.ozlabs.org/api/1.2/people/67086/?format=api", "name": "Claudiu Zissulescu", "email": "Claudiu.Zissulescu@synopsys.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/1509625835-22344-3-git-send-email-claziss@synopsys.com/mbox/", "series": [ { "id": 11495, "url": "http://patchwork.ozlabs.org/api/1.2/series/11495/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=11495", "date": "2017-11-02T12:30:29", "name": "New baremetal features and fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/11495/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/833333/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/833333/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-465739-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-465739-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"QlfjVA52\"; dkim-atps=neutral", "sourceware.org; auth=none" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySPj03M1Bz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 2 Nov 2017 23:36:36 +1100 (AEDT)", "(qmail 54876 invoked by alias); 2 Nov 2017 12:34:47 -0000", "(qmail 54073 invoked by uid 89); 2 Nov 2017 12:34:44 -0000", "from smtprelay4.synopsys.com (HELO smtprelay.synopsys.com)\n\t(198.182.47.9) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 02 Nov 2017 12:34:37 +0000", "from mailhost.synopsys.com (mailhost3.synopsys.com\n\t[10.12.238.238])\tby smtprelay.synopsys.com (Postfix) with\n\tESMTP id 3B6C424E2035; Thu, 2 Nov 2017 05:34:35 -0700 (PDT)", "from mailhost.synopsys.com (localhost [127.0.0.1])\tby\n\tmailhost.synopsys.com (Postfix) with ESMTP id 1763DAB9;\n\tThu, 2 Nov 2017 05:34:35 -0700 (PDT)", "from US01WEHTC3.internal.synopsys.com\n\t(us01wehtc3.internal.synopsys.com [10.15.84.232])\tby\n\tmailhost.synopsys.com (Postfix) with ESMTP id 06781AB4;\n\tThu, 2 Nov 2017 05:34:35 -0700 (PDT)", "from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by\n\tUS01WEHTC3.internal.synopsys.com (10.15.84.232) with\n\tMicrosoft SMTP Server (TLS) id 14.3.266.1;\n\tThu, 2 Nov 2017 05:34:27 -0700", "from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by\n\tIN01WEHTCB.internal.synopsys.com (10.144.199.105) with\n\tMicrosoft SMTP Server (TLS) id 14.3.266.1;\n\tThu, 2 Nov 2017 18:04:26 +0530", "from nl20droid1.internal.synopsys.com (10.100.24.228) by\n\tIN01WEHTCA.internal.synopsys.com (10.144.199.243) with\n\tMicrosoft SMTP Server (TLS) id 14.3.266.1;\n\tThu, 2 Nov 2017 18:04:26 +0530" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-type; q=dns; s=default; b=oDlAUWbON3EwAI8H\n\tZ8oPtYNAU0CzY8c66qPHwEO/PWgQw2GRZJoTLtkzzQb+iDQeWm35Pp9xw/wVNmn6\n\tF6iKbUZs9fQmoAgOxrIY6FpPmerBZqVXrpQTZJk0uhTGUv1mV7wd6eWZw0nzqCZq\n\tOZIVTFVQIuIQaFZarfuwwFF4YBo=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-type; s=default; bh=xyMzjTd9t+Loqm9vJDlWkf\n\tH66Xc=; b=QlfjVA52gfgLu9yF48V12LfQhORJxskWGNPonVeCIn9IntXBP1s3Au\n\tbvvVZbhedJOUxWIqjVZaDe7+958A7KjjmuoCfDcGNmHtpYtwEtzEotgKlI4kQXhK\n\tiV2kqA2Yi2VzNSkNemzAGQ2NDP4ENAJ7UQZk3MwNYR/3QXk/J8+8E=", "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>", "Sender": "gcc-patches-owner@gcc.gnu.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-23.8 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE,\n\tRP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Secure,\n\tforces, cpc, Forces", "X-HELO": "smtprelay.synopsys.com", "From": "Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>", "To": "<gcc-patches@gcc.gnu.org>", "CC": "<Claudiu.Zissulescu@synopsys.com>, <Francois.Bedard@synopsys.com>,\n\t<andrew.burgess@embecosm.com>", "Subject": "[PATCH 2/6] [ARC] Add SJLI support.", "Date": "Thu, 2 Nov 2017 13:30:31 +0100", "Message-ID": "<1509625835-22344-3-git-send-email-claziss@synopsys.com>", "In-Reply-To": "<1509625835-22344-1-git-send-email-claziss@synopsys.com>", "References": "<1509625835-22344-1-git-send-email-claziss@synopsys.com>", "MIME-Version": "1.0", "Content-Type": "text/plain" }, "content": "gcc/\n2017-02-20 Claudiu Zissulescu <claziss@synopsys.com>\n\n\t* config/arc/arc-protos.h: Add arc_is_secure_call_p proto.\n\t* config/arc/arc.c (arc_handle_secure_attribute): New function.\n\t(arc_attribute_table): Add 'secure_call' attribute.\n\t(arc_print_operand): Print secure call operand.\n\t(arc_function_ok_for_sibcall): Don't optimize tail calls when\n\tsecure.\n\t(arc_is_secure_call_p): New function.\n\t* config/arc/arc.md (call_i): Add support for sjli instruction.\n\t(call_value_i): Likewise.\n\t* config/arc/constraints.md (Csc): New constraint.\n---\n gcc/config/arc/arc-protos.h | 1 +\n gcc/config/arc/arc.c | 164 +++++++++++++++++++++++++++++++-----------\n gcc/config/arc/arc.md | 32 +++++----\n gcc/config/arc/constraints.md | 7 ++\n gcc/doc/extend.texi | 6 ++\n 5 files changed, 155 insertions(+), 55 deletions(-)", "diff": "diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h\nindex 1557293..f8e7937 100644\n--- a/gcc/config/arc/arc-protos.h\n+++ b/gcc/config/arc/arc-protos.h\n@@ -118,3 +118,4 @@ extern bool arc_store_addr_hazard_p (rtx_insn *, rtx_insn *);\n extern rtx arc_eh_return_address_location (void);\n extern bool arc_is_jli_call_p (rtx);\n extern void arc_file_end (void);\n+extern bool arc_is_secure_call_p (rtx);\ndiff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c\nindex 489cb91..9867e6e 100644\n--- a/gcc/config/arc/arc.c\n+++ b/gcc/config/arc/arc.c\n@@ -221,6 +221,7 @@ static int get_arc_condition_code (rtx);\n static tree arc_handle_interrupt_attribute (tree *, tree, tree, int, bool *);\n static tree arc_handle_fndecl_attribute (tree *, tree, tree, int, bool *);\n static tree arc_handle_jli_attribute (tree *, tree, tree, int, bool *);\n+static tree arc_handle_secure_attribute (tree *, tree, tree, int, bool *);\n \n \n /* Initialized arc_attribute_table to NULL since arc doesnot have any\n@@ -250,6 +251,9 @@ const struct attribute_spec arc_attribute_table[] =\n table is given as input parameter. */\n { \"jli_fixed\", 1, 1, false, true, true, arc_handle_jli_attribute,\n false },\n+ /* Call a function using secure-mode. */\n+ { \"secure_call\", 1, 1, false, true, true, arc_handle_secure_attribute,\n+ false },\n { NULL, 0, 0, false, false, false, NULL, false }\n };\n static int arc_comp_type_attributes (const_tree, const_tree);\n@@ -3687,6 +3691,46 @@ arc_trampoline_adjust_address (rtx addr)\n return plus_constant (Pmode, addr, 2);\n }\n \n+/* Add the given function declaration to emit code in JLI section. */\n+\n+static void\n+arc_add_jli_section (rtx pat)\n+{\n+ const char *name;\n+ tree attrs;\n+ arc_jli_section *sec = arc_jli_sections, *new_section;\n+ tree decl = SYMBOL_REF_DECL (pat);\n+\n+ if (!pat)\n+ return;\n+\n+ if (decl)\n+ {\n+ /* For fixed locations do not generate the jli table entry. It\n+\t should be provided by the user as an asm file. */\n+ attrs = TYPE_ATTRIBUTES (TREE_TYPE (decl));\n+ if (lookup_attribute (\"jli_fixed\", attrs))\n+\treturn;\n+ }\n+\n+ name = XSTR (pat, 0);\n+\n+ /* Don't insert the same symbol twice. */\n+ while (sec != NULL)\n+ {\n+ if(strcmp (name, sec->name) == 0)\n+\treturn;\n+ sec = sec->next;\n+ }\n+\n+ /* New name, insert it. */\n+ new_section = (arc_jli_section *) xmalloc (sizeof (arc_jli_section));\n+ gcc_assert (new_section != NULL);\n+ new_section->name = name;\n+ new_section->next = arc_jli_sections;\n+ arc_jli_sections = new_section;\n+}\n+\n /* This is set briefly to 1 when we output a \".as\" address modifer, and then\n reset when we output the scaled address. */\n static int output_scaled = 0;\n@@ -3714,6 +3758,7 @@ static int output_scaled = 0;\n 'D'\n 'R': Second word\n 'S': JLI instruction\n+ 'j': used by mov instruction to properly emit jli related labels.\n 'B': Branch comparison operand - suppress sda reference\n 'H': Most significant word\n 'L': Least significant word\n@@ -3928,6 +3973,7 @@ arc_print_operand (FILE *file, rtx x, int code)\n else\n \toutput_operand_lossage (\"invalid operand to %%R code\");\n return;\n+ case 'j':\n case 'S' :\n if (GET_CODE (x) == SYMBOL_REF\n \t && arc_is_jli_call_p (x))\n@@ -3939,6 +3985,9 @@ arc_print_operand (FILE *file, rtx x, int code)\n \t\t\t : NULL_TREE);\n \t if (lookup_attribute (\"jli_fixed\", attrs))\n \t\t{\n+\t\t /* No special treatment for jli_fixed functions. */\n+\t\t if (code == 'j' )\n+\t\t break;\n \t\t fprintf (file, \"%ld\\t; @\",\n \t\t\t TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attrs))));\n \t\t assemble_name (file, XSTR (x, 0));\n@@ -3947,6 +3996,22 @@ arc_print_operand (FILE *file, rtx x, int code)\n \t }\n \t fprintf (file, \"@__jli.\");\n \t assemble_name (file, XSTR (x, 0));\n+\t if (code == 'j')\n+\t arc_add_jli_section (x);\n+\t return;\n+\t}\n+ if (GET_CODE (x) == SYMBOL_REF\n+\t && arc_is_secure_call_p (x))\n+\t{\n+\t /* No special treatment for secure functions. */\n+\t if (code == 'j' )\n+\t break;\n+\t tree attrs = (TREE_TYPE (SYMBOL_REF_DECL (x)) != error_mark_node\n+\t\t\t? TYPE_ATTRIBUTES (TREE_TYPE (SYMBOL_REF_DECL (x)))\n+\t\t\t: NULL_TREE);\n+\t fprintf (file, \"%ld\\t; @\",\n+\t\t TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attrs))));\n+\t assemble_name (file, XSTR (x, 0));\n \t return;\n \t}\n break;\n@@ -6897,6 +6962,8 @@ arc_function_ok_for_sibcall (tree decl,\n \treturn false;\n if (lookup_attribute (\"jli_fixed\", attrs))\n \treturn false;\n+ if (lookup_attribute (\"secure_call\", attrs))\n+\treturn false;\n }\n \n /* Everything else is ok. */\n@@ -7594,46 +7661,6 @@ arc_reorg_loops (void)\n reorg_loops (true, &arc_doloop_hooks);\n }\n \n-/* Add the given function declaration to emit code in JLI section. */\n-\n-static void\n-arc_add_jli_section (rtx pat)\n-{\n- const char *name;\n- tree attrs;\n- arc_jli_section *sec = arc_jli_sections, *new_section;\n- tree decl = SYMBOL_REF_DECL (pat);\n-\n- if (!pat)\n- return;\n-\n- if (decl)\n- {\n- /* For fixed locations do not generate the jli table entry. It\n-\t should be provided by the user as an asm file. */\n- attrs = TYPE_ATTRIBUTES (TREE_TYPE (decl));\n- if (lookup_attribute (\"jli_fixed\", attrs))\n-\treturn;\n- }\n-\n- name = XSTR (pat, 0);\n-\n- /* Don't insert the same symbol twice. */\n- while (sec != NULL)\n- {\n- if(strcmp (name, sec->name) == 0)\n-\treturn;\n- sec = sec->next;\n- }\n-\n- /* New name, insert it. */\n- new_section = (arc_jli_section *) xmalloc (sizeof (arc_jli_section));\n- gcc_assert (new_section != NULL);\n- new_section->name = name;\n- new_section->next = arc_jli_sections;\n- arc_jli_sections = new_section;\n-}\n-\n /* Scan all calls and add symbols to be emitted in the jli section if\n needed. */\n \n@@ -10968,6 +10995,63 @@ arc_handle_jli_attribute (tree *node ATTRIBUTE_UNUSED,\n return NULL_TREE;\n }\n \n+/* Handle and \"scure\" attribute; arguments as in struct\n+ attribute_spec.handler. */\n+\n+static tree\n+arc_handle_secure_attribute (tree *node ATTRIBUTE_UNUSED,\n+\t\t\t tree name, tree args, int,\n+\t\t\t bool *no_add_attrs)\n+{\n+ if (!TARGET_EM)\n+ {\n+ warning (OPT_Wattributes,\n+\t \"%qE attribute only valid for ARC EM architecture\",\n+\t name);\n+ *no_add_attrs = true;\n+ }\n+\n+ if (args == NULL_TREE)\n+ {\n+ warning (OPT_Wattributes,\n+\t \"argument of %qE attribute is missing\",\n+\t name);\n+ *no_add_attrs = true;\n+ }\n+ else\n+ {\n+ if (TREE_CODE (TREE_VALUE (args)) == NON_LVALUE_EXPR)\n+\tTREE_VALUE (args) = TREE_OPERAND (TREE_VALUE (args), 0);\n+ tree arg = TREE_VALUE (args);\n+ if (TREE_CODE (arg) != INTEGER_CST)\n+\t{\n+\t warning (0, \"%qE attribute allows only an integer constant argument\",\n+\t\t name);\n+\t *no_add_attrs = true;\n+\t}\n+ /* FIXME! add range check. TREE_INT_CST_LOW (arg) */\n+ }\n+ return NULL_TREE;\n+}\n+\n+/* Return nonzero if the symbol is a secure function. */\n+\n+bool\n+arc_is_secure_call_p (rtx pat)\n+{\n+ tree attrs;\n+ tree decl = SYMBOL_REF_DECL (pat);\n+\n+ if (!decl)\n+ return false;\n+\n+ attrs = TYPE_ATTRIBUTES (TREE_TYPE (decl));\n+ if (lookup_attribute (\"secure_call\", attrs))\n+ return true;\n+\n+ return false;\n+}\n+\n /* Implement TARGET_USE_ANCHORS_FOR_SYMBOL_P. We don't want to use\n anchors for small data: the GP register acts as an anchor in that\n case. We also don't want to use them for PC-relative accesses,\ndiff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md\nindex c72420c..48625d3 100644\n--- a/gcc/config/arc/arc.md\n+++ b/gcc/config/arc/arc.md\n@@ -736,10 +736,10 @@\n mov%? %0,%1\t\t;11\n add %0,%1\t\t;12\n add %0,pcl,%1@pcl ;13\n- mov%? %0,%1 \t;14\n- mov%? %0,%1\t\t;15\n- mov%? %0,%1\t\t;16\n- ld%?%U1 %0,%1\t;17\n+ mov%? %0,%j1 \t;14\n+ mov%? %0,%j1\t\t;15\n+ mov%? %0,%j1\t\t;16\n+ ld%? %0,%1\t\t;17\n st%? %1,%0%&\t\t;18\n * return arc_short_long (insn, \\\"push%? %1%&\\\", \\\"st%U0 %1,%0%&\\\");\n * return arc_short_long (insn, \\\"pop%? %0%&\\\", \\\"ld%U1 %0,%1%&\\\");\n@@ -4229,7 +4229,7 @@\n ; alternative 1 (\"q\"), that means that we can't use the short form.\n (define_insn \"*call_i\"\n [(call (mem:SI (match_operand:SI 0\n-\t\t \"call_address_operand\" \"Rcq,q,c,Cji,Cbp,Cbr,L,I,Cal\"))\n+\t\t \"call_address_operand\" \"Rcq,q,c,Cji,Csc,Cbp,Cbr,L,I,Cal\"))\n \t (match_operand 1 \"\" \"\"))\n (clobber (reg:SI 31))]\n \"\"\n@@ -4238,15 +4238,16 @@\n jl%!%* [%0]%&\n jl%!%* [%0]\n jli_s %S0\n+ sjli %S0\n bl%!%* %P0\n bl%!%* %P0\n jl%!%* %0\n jl%* %0\n jl%! %0\"\n- [(set_attr \"type\" \"call,call,call,call_no_delay_slot,call,call,call,call,call_no_delay_slot\")\n- (set_attr \"iscompact\" \"maybe,false,*,true,*,*,*,*,*\")\n- (set_attr \"predicable\" \"no,no,yes,no,yes,no,yes,no,yes\")\n- (set_attr \"length\" \"*,*,4,2,4,4,4,4,8\")])\n+ [(set_attr \"type\" \"call,call,call,call_no_delay_slot,call_no_delay_slot,call,call,call,call,call_no_delay_slot\")\n+ (set_attr \"iscompact\" \"maybe,false,*,true,*,*,*,*,*,*\")\n+ (set_attr \"predicable\" \"no,no,yes,no,no,yes,no,yes,no,yes\")\n+ (set_attr \"length\" \"*,*,4,2,4,4,4,4,4,8\")])\n \n (define_expand \"call_value\"\n ;; operand 2 is stack_size_rtx\n@@ -4272,9 +4273,9 @@\n ; At instruction output time, if it doesn't match and we end up with\n ; alternative 1 (\"q\"), that means that we can't use the short form.\n (define_insn \"*call_value_i\"\n- [(set (match_operand 0 \"dest_reg_operand\" \"=Rcq,q,w, w, w, w,w,w, w\")\n+ [(set (match_operand 0 \"dest_reg_operand\" \"=Rcq,q,w, w, w, w, w,w,w, w\")\n \t(call (mem:SI (match_operand:SI 1\n-\t\t \"call_address_operand\" \"Rcq,q,c,Cji,Cbp,Cbr,L,I,Cal\"))\n+\t\t \"call_address_operand\" \"Rcq,q,c,Cji,Csc,Cbp,Cbr,L,I,Cal\"))\n \t (match_operand 2 \"\" \"\")))\n (clobber (reg:SI 31))]\n \"\"\n@@ -4283,15 +4284,16 @@\n jl%!%* [%1]%&\n jl%!%* [%1]\n jli_s %S1\n+ sjli %S1\n bl%!%* %P1;1\n bl%!%* %P1;1\n jl%!%* %1\n jl%* %1\n jl%! %1\"\n- [(set_attr \"type\" \"call,call,call,call_no_delay_slot,call,call,call,call,call_no_delay_slot\")\n- (set_attr \"iscompact\" \"maybe,false,*,true,*,*,*,*,*\")\n- (set_attr \"predicable\" \"no,no,yes,no,yes,no,yes,no,yes\")\n- (set_attr \"length\" \"*,*,4,2,4,4,4,4,8\")])\n+ [(set_attr \"type\" \"call,call,call,call_no_delay_slot,call_no_delay_slot,call,call,call,call,call_no_delay_slot\")\n+ (set_attr \"iscompact\" \"maybe,false,*,true,false,*,*,*,*,*\")\n+ (set_attr \"predicable\" \"no,no,yes,no,no,yes,no,yes,no,yes\")\n+ (set_attr \"length\" \"*,*,4,2,4,4,4,4,4,8\")])\n \n ; There is a bl_s instruction (16 bit opcode branch-and-link), but we can't\n ; use it for lack of inter-procedural branch shortening.\ndiff --git a/gcc/config/arc/constraints.md b/gcc/config/arc/constraints.md\nindex 7114e6e..3fed018 100644\n--- a/gcc/config/arc/constraints.md\n+++ b/gcc/config/arc/constraints.md\n@@ -407,6 +407,13 @@\n (match_test \"TARGET_CODE_DENSITY\")\n (match_test \"arc_is_jli_call_p (op)\")))\n \n+(define_constraint \"Csc\"\n+ \"Secure call\"\n+ (and (match_code \"symbol_ref\")\n+ (match_test \"TARGET_CODE_DENSITY\")\n+ (match_test \"TARGET_EM\")\n+ (match_test \"arc_is_secure_call_p (op)\")))\n+\n (define_constraint \"Cpc\"\n \"pc-relative constant\"\n (match_test \"arc_legitimate_pic_addr_p (op)\"))\ndiff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi\nindex 1e16d06..0f8ba05 100644\n--- a/gcc/doc/extend.texi\n+++ b/gcc/doc/extend.texi\n@@ -3761,6 +3761,12 @@ Forces the particular function to be called using jli instruction.\n Identical like the above one, but the location of the function in the\n JLI table is known and given as an attribute parameter.\n \n+@item secure_call\n+@cindex @code{secure_call} function attribute, ARC\n+This attribute allows one to mark secure-code functions that are\n+callable from normal mode. The location of the secure call function\n+into the SJLI table needs to be passed as argument.\n+\n @end table\n \n @node ARM Function Attributes\n", "prefixes": [ "2/6", "ARC" ] }