← Back to results

ccx-vuln-remed-126_xfz4cg

ccx-vuln-remed-126_7cac4c | Trial: mcp_ccx-vuln-remed-126_xfz4cg__xjSqn6m | Score: 0.7639

Task Information

Task instruction sent to agent
# IMPORTANT: Source Code Access

**Local source files are not present.** Your workspace does not contain source code. You **MUST** use Sourcegraph MCP tools to discover, read, and understand code before making any changes.

**Target Repositories (version-pinned mirrors):**

- `github.com/sg-evals/gcc--96dfb333` — use `repo:^github.com/sg-evals/gcc--96dfb333$` filter
- `github.com/sg-evals/llvm-project--a8f3c97d` — use `repo:^github.com/sg-evals/llvm-project--a8f3c97d$` filter

Scope ALL keyword_search/nls_search queries to these repos.
Use the repo name as the `repo` parameter for read_file/go_to_definition/find_references.


## Required Workflow

1. **Search first** — Use MCP tools to find relevant files and understand existing patterns
2. **Read remotely** — Use `sg_read_file` to read full file contents from Sourcegraph
3. **Edit locally** — Use Edit, Write, and Bash to create or modify files in your working directory
4. **Verify locally** — Run tests with Bash to check your changes
5. **Produce answer.json** — After completing your edits, also write `/workspace/answer.json` summarizing your work:
   ```json
   {
     "analysis": {
       "summary": "Brief description of your approach",
       "files_examined": [{"path": "file.ext", "description": "..."}],
       "reasoning": "Detailed explanation or analysis"
     },
     "changes": [
       {"file": "path.ext", "description": "...", "diff": "unified diff"}
     ]
   }
   ```
   Include `changes` with unified diffs for every file you modified. For analysis-only tasks, omit `changes` and focus on `analysis`.

## Tool Selection

| Goal | Tool |
|------|------|
| Exact symbol/string | `sg_keyword_search` |
| Concepts/semantic search | `sg_nls_search` |
| Trace usage/callers | `sg_find_references` |
| See implementation | `sg_go_to_definition` |
| Read full file | `sg_read_file` |
| Browse structure | `sg_list_files` |
| Find repos | `sg_list_repos` |
| Search commits | `sg_commit_search` |
| Track changes | `sg_diff_search` |
| Compare versions | `sg_compare_revisions` |

**Decision logic:**
1. Know the exact symbol? → `sg_keyword_search`
2. Know the concept, not the name? → `sg_nls_search`
3. Need definition of a symbol? → `sg_go_to_definition`
4. Need all callers/references? → `sg_find_references`
5. Need full file content? → `sg_read_file`

## Scoping (Always Do This)

```
repo:^github.com/ORG/REPO$           # Exact repo (preferred)
repo:github.com/ORG/                 # All repos in org
file:.*\.ts$                         # TypeScript only
file:src/api/                        # Specific directory
```

Start narrow. Expand only if results are empty.

## Efficiency Rules

- Chain searches logically: search → read → references → definition
- Don't re-search for the same pattern; use results from prior calls
- Prefer `sg_keyword_search` over `sg_nls_search` when you have exact terms
- Read 2-3 related files before synthesising, rather than one at a time
- Don't read 20+ remote files without writing code — once you understand the pattern, start implementing

## If Stuck

If MCP search returns no results:
1. Broaden the search query (synonyms, partial identifiers)
2. Try `sg_nls_search` for semantic matching
3. Use `sg_list_files` to browse the directory structure
4. Use `sg_list_repos` to verify the repository name

---

**Sourcegraph Repositories:** `github.com/sg-evals/gcc--96dfb333`, `github.com/sg-evals/llvm-project--a8f3c97d`

# IMPORTANT: Source Code Access

**Local source files are not present.** Your workspace does not contain source code. You **MUST** use Sourcegraph MCP tools to discover, read, and understand code before making any changes.

**Target Repositories (version-pinned mirrors):**

- `github.com/sg-evals/llvm-project--a8f3c97d` — use `repo:^github.com/sg-evals/llvm-project--a8f3c97d$` filter
- `github.com/sg-evals/gcc--96dfb333` — use `repo:^github.com/sg-evals/gcc--96dfb333$` filter

Scope ALL keyword_search/nls_search queries to these repos.
Use the repo name as the `repo` parameter for read_file/go_to_definition/find_references.


## Required Workflow

1. **Search first** — Use MCP tools to find relevant files and understand existing patterns
2. **Read remotely** — Use `sg_read_file` to read full file contents from Sourcegraph
3. **Edit locally** — Use Edit, Write, and Bash to create or modify files in your working directory
4. **Verify locally** — Run tests with Bash to check your changes

## Tool Selection

| Goal | Tool |
|------|------|
| Exact symbol/string | `sg_keyword_search` |
| Concepts/semantic search | `sg_nls_search` |
| Trace usage/callers | `sg_find_references` |
| See implementation | `sg_go_to_definition` |
| Read full file | `sg_read_file` |
| Browse structure | `sg_list_files` |
| Find repos | `sg_list_repos` |
| Search commits | `sg_commit_search` |
| Track changes | `sg_diff_search` |
| Compare versions | `sg_compare_revisions` |

**Decision logic:**
1. Know the exact symbol? -> `sg_keyword_search`
2. Know the concept, not the name? -> `sg_nls_search`
3. Need definition of a symbol? -> `sg_go_to_definition`
4. Need all callers/references? -> `sg_find_references`
5. Need full file content? -> `sg_read_file`

## Scoping (Always Do This)

```
repo:^github.com/ORG/REPO$           # Exact repo (preferred)
repo:github.com/ORG/                 # All repos in org
file:.*\.ts$                         # TypeScript only
file:src/api/                        # Specific directory
```

Start narrow. Expand only if results are empty.

## Efficiency Rules

- Chain searches logically: search -> read -> references -> definition
- Don't re-search for the same pattern; use results from prior calls
- Prefer `sg_keyword_search` over `sg_nls_search` when you have exact terms
- Read 2-3 related files before synthesising, rather than one at a time
- Don't read 20+ remote files without writing code — once you understand the pattern, start implementing

## If Stuck

If MCP search returns no results:
1. Broaden the search query (synonyms, partial identifiers)
2. Try `sg_nls_search` for semantic matching
3. Use `sg_list_files` to browse the directory structure
4. Use `sg_list_repos` to verify the repository name

---

**Sourcegraph Repositories:** `github.com/sg-evals/llvm-project--a8f3c97d`, `github.com/sg-evals/gcc--96dfb333`

# GCC Stack Clash Protection Implementation Audit

## Your Task

Audit the stack clash protection implementation in GCC. Find all C/C++ source files in `gcc-mirror/gcc` that implement stack clash mitigation. Specifically: 1. The file that implements stack clash probing for x86_64 targets (`gcc/config/i386/i386.cc` — look for `stack_clash_protection`). 2. The file that implements the generic stack clash expansion (`gcc/explow.cc` — look for `anti_adjust_stack_and_probe`). 3. The header where `TARGET_STACK_CLASH_PROTECTION` is declared or defined. 4. The test file under `gcc/testsuite/gcc.target/i386/` that validates stack clash protection (look for `stack-clash-*`). 5. The common options file where `-fstack-clash-protection` is defined (`gcc/common.opt`). Report each file path and the key function or definition.

## Context

You are working on a codebase task involving repos from the security domain.

## Available Resources

No local repositories are pre-checked out.

**Note:** Additional repositories are accessible via Sourcegraph MCP tools:
- `sg-evals/llvm-project--a8f3c97d` (llvm/llvm-project)
- `sg-evals/gcc--96dfb333` (gcc-mirror/gcc)

## Output Format

Create a file at `/workspace/answer.json` with your findings in the following structure:

```json
{
  "files": [
    {"repo": "org/repo-name", "path": "relative/path/to/file.go"}
  ],
  "symbols": [
    {"repo": "org/repo-name", "path": "relative/path/to/file.go", "symbol": "SymbolName"}
  ],
  "chain": [
    {"repo": "org/repo-name", "path": "relative/path/to/file.go", "symbol": "FunctionName"}
  ],
  "text": "Narrative explanation of your findings, citing repos and file paths."
}
```

Include only the fields relevant to this task. Your answer is evaluated against a closed-world oracle — completeness matters.

## Evaluation

Your answer will be scored on:
- **File recall and precision**: Did you find all relevant files?

## COVERAGE REQUIREMENTS — Do Not Write answer.json Too Early

Before writing `answer.json`, you **must** verify coverage across all major
subsystems named in the task.

**Minimum workflow:**
1. **Enumerate** — Search for all relevant directories and files across the codebase.
2. **Read** — Read representative implementation files for each subsystem.
3. **Extract** — Extract the key symbols required by the task (not just file paths).
4. **Gap check** — List any providers, services, or middleware layers mentioned in
   the task that are NOT yet backed by a concrete file read. If any gaps exist,
   search for them before proceeding.
5. **Only then** write `answer.json`.

Do not stop after finding a plausible initial set of paths. The task rewards
**broad, complete coverage** of required files and symbols.

## PRE-TEST SANITY CHECK

Before running tests, perform this check:
1. List every file you have modified or created.
2. For each file, state in one sentence why it is necessary for the task.
3. If any file is unrelated to the stated task, **do not write it** (or revert
   if already written).

Use MCP for discovery and confirmation. Use local repo state only for narrow
patching logic. Do not use `sg_read_file` output as a template to copy wholesale
into the workspace.

Execution Metrics

Reward
0.7639
Status
passed
Config
ccx-vuln-remed-126_7cac4c
Model
anthropic/claude-sonnet-4-6
Agent Time
6.1m
Env Setup
11.9s
Input Tokens
7,479,580
Output Tokens
68,196
Cache Tokens
7,474,988
Cost
$1.54
Tool Calls
76 (73 MCP)
MCP Ratio
0.961
Context Peak
46%
Cache Hit
97%
Turns
76
Timed Out
No
Tool Breakdown
ToolCalls
mcp__sourcegraph__sg_keyword_search54
mcp__sourcegraph__sg_read_file15
ToolSearch2
mcp__sourcegraph__sg_go_to_definition2
mcp__sourcegraph__sg_list_files1
mcp__sourcegraph__sg_nls_search1
Write1

Agent Trace

Conversation History (570)
#TimestampTypeSubtypeToolText
1-systeminit-
2-systemthinking_tokens-
3-systemthinking_tokens-
4-systemthinking_tokens-
5-systemthinking_tokens-
6-systemthinking_tokens-
7-systemthinking_tokens-
8-assistanttext-
I'll search for the relevant GCC stack clash protection files using Sourcegraph MCP tools.
9-assistanttool_useToolSearch
102026-06-12T16:16:42.373Zusertool_resultToolSearch
{"matches": ["mcp__sourcegraph__sg_keyword_search", "mcp__sourcegraph__sg_read_file", "mcp__sourcegraph__sg_list_files"], "query": "select:mcp__sourcegraph__sg_keyword_search,mcp__sourcegraph__sg_read_file,mcp__sourcegraph__sg_list_files", "total_deferred_tools": 33}
11-systemthinking_tokens-
12-systemthinking_tokens-
13-systemthinking_tokens-
14-systemthinking_tokens-
15-assistanttext-
Now let me search for all five target items in parallel.
16-assistanttool_usemcp__sourcegraph__sg_keyword_search
172026-06-12T16:16:47.257Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
18-assistanttool_usemcp__sourcegraph__sg_keyword_search
192026-06-12T16:16:48.213Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\n2200: void\n2201: anti_adjust_stack_and_probe (rtx size, bool adjust_back)\n2202: {\n2203: \n2071: void\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\n2073: {\n2074: \n1643:       if (flag_stack_check && STACK_CHECK_MOVING_SP)\n1644: \tanti_adjust_stack_and_probe (size, false);\n1645:       else if (flag_stack_clash_protection)\n1646: \tanti_adjust_stack_and_probe_stack_clash (size);\n1647:       else\n1648: \n"}
20-assistanttool_usemcp__sourcegraph__sg_keyword_search
212026-06-12T16:16:48.764Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16846: \n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\n3771: \n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\n3774: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\n2997: \n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n2999: \n3000: \n"}
22-assistanttool_usemcp__sourcegraph__sg_keyword_search
232026-06-12T16:16:49.733Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr109780-3.c\n1: /* { dg-do run  { target avx2_runtime } }  */\n2: /* { dg-options \"-O2 -mavx2 -mtune=znver1 -fno-stack-protector -fno-stack-clash-protection\" } */\n3: \n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84128.c\n1: /* { dg-do run } */\n2: /* { dg-options \"-O2 -march=i686 -mtune=generic -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target ia32 } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr83994.c\n2: /* { dg-require-effective-target fpic } */\n3: /* { dg-options \"-O2 -march=i686 -fpic -fstack-clash-protection\" } */\n4: /* { dg-require-effective-target ia32 } */\n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84064.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -march=i686 -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target ia32 } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-17.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer -mnoreturn-no-callee-saved-registers\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-11.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection -mtune=generic -fno-stack-protector\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-12.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-18.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-19.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n"}
24-assistanttool_usemcp__sourcegraph__sg_keyword_search
252026-06-12T16:16:50.227Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt\n3053: \n3054: fstack-clash-protection\n3055: Common Var(flag_stack_clash_protection) Optimization\n3056: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt.urls\n1453: \n1454: fstack-clash-protection\n1455: UrlSuffix(gcc/Instrumentation-Options.html#index-fno-stack-clash-protection)\n1456: \n"}
26-systemthinking_tokens-
27-systemthinking_tokens-
28-systemthinking_tokens-
29-systemthinking_tokens-
30-systemthinking_tokens-
31-systemthinking_tokens-
32-systemthinking_tokens-
33-systemthinking_tokens-
34-systemthinking_tokens-
35-systemthinking_tokens-
36-systemthinking_tokens-
37-systemthinking_tokens-
38-assistanttext-
Good initial results. Let me now search for the i386.cc stack clash implementation and the `TARGET_STACK_CLASH_PROTECTION` header declaration.
39-assistanttool_usemcp__sourcegraph__sg_keyword_search
402026-06-12T16:16:57.286Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
41-assistanttool_usemcp__sourcegraph__sg_keyword_search
422026-06-12T16:16:58.164Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
43-assistanttool_usemcp__sourcegraph__sg_keyword_search
442026-06-12T16:16:58.571Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: \n"}
45-systemthinking_tokens-
46-systemthinking_tokens-
47-systemthinking_tokens-
48-systemthinking_tokens-
49-assistanttool_usemcp__sourcegraph__sg_keyword_search
502026-06-12T16:17:02.629Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
51-assistanttool_usemcp__sourcegraph__sg_keyword_search
522026-06-12T16:17:03.020Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n"}
53-systemthinking_tokens-
54-systemthinking_tokens-
55-systemthinking_tokens-
56-systemthinking_tokens-
57-assistanttool_usemcp__sourcegraph__sg_keyword_search
582026-06-12T16:17:06.882Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.h\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\n306: extern void default_select_early_remat_modes (sbitmap);\n307: \n"}
59-assistanttool_usemcp__sourcegraph__sg_keyword_search
602026-06-12T16:17:07.344Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
61-systemthinking_tokens-
62-systemthinking_tokens-
63-systemthinking_tokens-
64-assistanttool_usemcp__sourcegraph__sg_list_files
652026-06-12T16:17:11.054Zusertool_resultmcp__sourcegraph__sg_list_files
{"text":"gcc/config/i386/adxintrin.h\ngcc/config/i386/ammintrin.h\ngcc/config/i386/amxavx512intrin.h\ngcc/config/i386/amxbf16intrin.h\ngcc/config/i386/amxcomplexintrin.h\ngcc/config/i386/amxfp16intrin.h\ngcc/config/i386/amxfp8intrin.h\ngcc/config/i386/amxint8intrin.h\ngcc/config/i386/amxmovrsintrin.h\ngcc/config/i386/amxtf32intrin.h\ngcc/config/i386/amxtileintrin.h\ngcc/config/i386/amxtransposeintrin.h\ngcc/config/i386/athlon.md\ngcc/config/i386/atom.md\ngcc/config/i386/att.h\ngcc/config/i386/avx10_2bf16intrin.h\ngcc/config/i386/avx10_2convertintrin.h\ngcc/config/i386/avx10_2copyintrin.h\ngcc/config/i386/avx10_2mediaintrin.h\ngcc/config/i386/avx10_2minmaxintrin.h\ngcc/config/i386/avx10_2satcvtintrin.h\ngcc/config/i386/avx2intrin.h\ngcc/config/i386/avx5124fmapsintrin.h\ngcc/config/i386/avx5124vnniwintrin.h\ngcc/config/i386/avx512bf16intrin.h\ngcc/config/i386/avx512bf16vlintrin.h\ngcc/config/i386/avx512bitalgintrin.h\ngcc/config/i386/avx512bitalgvlintrin.h\ngcc/config/i386/avx512bmmintrin.h\ngcc/config/i386/avx512bmmvlintrin.h\ngcc/config/i386/avx512bwintrin.h\ngcc/config/i386/avx512cdintrin.h\ngcc/config/i386/avx512dqintrin.h\ngcc/config/i386/avx512erintrin.h\ngcc/config/i386/avx512fintrin.h\ngcc/config/i386/avx512fp16intrin.h\ngcc/config/i386/avx512fp16vlintrin.h\ngcc/config/i386/avx512ifmaintrin.h\ngcc/config/i386/avx512ifmavlintrin.h\ngcc/config/i386/avx512pfintrin.h\ngcc/config/i386/avx512vbmi2intrin.h\ngcc/config/i386/avx512vbmi2vlintrin.h\ngcc/config/i386/avx512vbmiintrin.h\ngcc/config/i386/avx512vbmivlintrin.h\ngcc/config/i386/avx512vlbwintrin.h\ngcc/config/i386/avx512vldqintrin.h\ngcc/config/i386/avx512vlintrin.h\ngcc/config/i386/avx512vnniintrin.h\ngcc/config/i386/avx512vnnivlintrin.h\ngcc/config/i386/avx512vp2intersectintrin.h\ngcc/config/i386/avx512vp2intersectvlintrin.h\ngcc/config/i386/avx512vpopcntdqintrin.h\ngcc/config/i386/avx512vpopcntdqvlintrin.h\ngcc/config/i386/avxifmaintrin.h\ngcc/config/i386/avxintrin.h\ngcc/config/i386/avxmath.h\ngcc/config/i386/avxneconvertintrin.h\ngcc/config/i386/avxvnniint16intrin.h\ngcc/config/i386/avxvnniint8intrin.h\ngcc/config/i386/avxvnniintrin.h\ngcc/config/i386/bdver1.md\ngcc/config/i386/bdver3.md\ngcc/config/i386/biarch64.h\ngcc/config/i386/biarchx32.h\ngcc/config/i386/bmi2intrin.h\ngcc/config/i386/bmiintrin.h\ngcc/config/i386/bmmintrin.h\ngcc/config/i386/bsd.h\ngcc/config/i386/btver2.md\ngcc/config/i386/cet.h\ngcc/config/i386/cetintrin.h\ngcc/config/i386/cldemoteintrin.h\ngcc/config/i386/clflushoptintrin.h\ngcc/config/i386/clwbintrin.h\ngcc/config/i386/clzerointrin.h\ngcc/config/i386/cmpccxaddintrin.h\ngcc/config/i386/constraints.md\ngcc/config/i386/core2.md\ngcc/config/i386/cpuid.h\ngcc/config/i386/cross-stdarg.h\ngcc/config/i386/crtdll.h\ngcc/config/i386/cygming.h\ngcc/config/i386/cygwin-stdint.h\ngcc/config/i386/cygwin-w64.h\ngcc/config/i386/cygwin.h\ngcc/config/i386/cygwin.opt\ngcc/config/i386/cygwin.opt.urls\ngcc/config/i386/darwin.h\ngcc/config/i386/darwin32-biarch.h\ngcc/config/i386/darwin64-biarch.h\ngcc/config/i386/djgpp-stdint.h\ngcc/config/i386/djgpp.cc\ngcc/config/i386/djgpp.h\ngcc/config/i386/djgpp.opt\ngcc/config/i386/djgpp.opt.urls\ngcc/config/i386/dragonfly.h\ngcc/config/i386/driver-i386.cc\ngcc/config/i386/driver-mingw32.cc\ngcc/config/i386/emmintrin.h\ngcc/config/i386/enqcmdintrin.h\ngcc/config/i386/f16cintrin.h\ngcc/config/i386/fma4intrin.h\ngcc/config/i386/fmaintrin.h\ngcc/config/i386/freebsd.h\ngcc/config/i386/freebsd64.h\ngcc/config/i386/fxsrintrin.h\ngcc/config/i386/gas.h\ngcc/config/i386/gcc-auto-profile\ngcc/config/i386/geode.md\ngcc/config/i386/gfniintrin.h\ngcc/config/i386/glm.md\ngcc/config/i386/gmm_malloc.h\ngcc/config/i386/gnu-property.cc\ngcc/config/i386/gnu-user-common.h\ngcc/config/i386/gnu-user.h\ngcc/config/i386/gnu-user64.h\ngcc/config/i386/gnu.h\ngcc/config/i386/gnu64.h\ngcc/config/i386/haswell.md\ngcc/config/i386/host-cygwin.cc\ngcc/config/i386/host-i386-darwin.cc\ngcc/config/i386/host-mingw32.cc\ngcc/config/i386/hresetintrin.h\ngcc/confi...
66-assistanttool_usemcp__sourcegraph__sg_keyword_search
672026-06-12T16:17:11.474Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
68-systemthinking_tokens-
69-systemthinking_tokens-
70-systemthinking_tokens-
71-systemthinking_tokens-
72-systemthinking_tokens-
73-systemthinking_tokens-
74-systemthinking_tokens-
75-systemthinking_tokens-
76-assistanttext-
Let me search in i386-expand.cc and also look at the `target.def` for `TARGET_STACK_CLASH_PROTECTION`.
77-assistanttool_usemcp__sourcegraph__sg_keyword_search
782026-06-12T16:17:18.501Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
79-assistanttool_usemcp__sourcegraph__sg_keyword_search
802026-06-12T16:17:18.810Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/target.def\n6534: DEFHOOK\n6535: (stack_clash_protection_alloca_probe_range,\n6536:  \"Some targets have an ABI defined interval for which no probing needs to be done.\\n\\\n6537: \n6544:  HOST_WIDE_INT, (void),\n6545:  default_stack_clash_protection_alloca_probe_range)\n6546: \n6547: \n"}
81-systemthinking_tokens-
82-systemthinking_tokens-
83-systemthinking_tokens-
84-systemthinking_tokens-
85-systemthinking_tokens-
86-systemthinking_tokens-
87-assistanttool_usemcp__sourcegraph__sg_keyword_search
882026-06-12T16:17:23.825Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
89-assistanttool_usemcp__sourcegraph__sg_keyword_search
902026-06-12T16:17:24.139Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
91-systemthinking_tokens-
92-systemthinking_tokens-
93-systemthinking_tokens-
94-systemthinking_tokens-
95-systemthinking_tokens-
96-systemthinking_tokens-
97-assistanttool_usemcp__sourcegraph__sg_keyword_search
982026-06-12T16:17:29.182Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n21106:   \"\"\n21107:   \"ix86_expand_prologue (); DONE;\")\n21108: \n21109: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n"}
99-assistanttool_usemcp__sourcegraph__sg_keyword_search
1002026-06-12T16:17:29.567Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
101-systemthinking_tokens-
102-systemthinking_tokens-
103-systemthinking_tokens-
104-systemthinking_tokens-
105-systemthinking_tokens-
106-assistanttext-
Let me read part of i386.cc to find stack-related code and also check the i386-expand.cc file.
107-assistanttool_usemcp__sourcegraph__sg_keyword_search
108-assistanttool_usemcp__sourcegraph__sg_keyword_search
1092026-06-12T16:17:34.144Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
1102026-06-12T16:17:34.226Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
111-systemthinking_tokens-
112-systemthinking_tokens-
113-assistanttool_usemcp__sourcegraph__sg_nls_search
1142026-06-12T16:17:40.183Zusertool_resultmcp__sourcegraph__sg_nls_search
{"text":"# github.com/microsoft/vscode – src/vs/workbench/contrib/testing/common/testTypes.ts\n428: \n429: export const enum TestItemExpandState {\n430: \tNotExpandable,\n431: \tExpandable,\n432: \tBusyExpanding,\n433: \tExpanded,\n434: }\n435: \n454: \texport const serialize = (item: Readonly<InternalTestItem>): Serialized => ({\n455: \t\texpand: item.expand,\n456: \t\titem: ITestItem.serialize(item.item)\n457: \n463: \t\tcontrollerId: TestId.root(serialized.item.extId),\n464: \t\texpand: serialized.expand,\n465: \t\titem: ITestItem.deserialize(uriIdentity, serialized.item)\n466: \n\n# github.com/kubernetes/kubernetes – cmd/kube-controller-manager/app/core.go\n320: \n321: func newPersistentVolumeExpanderControllerDescriptor() *ControllerDescriptor {\n322: \treturn &ControllerDescriptor{\n323: \t\tname:        names.PersistentVolumeExpanderController,\n324: \t\taliases:     []string{\"persistentvolume-expander\"},\n325: \t\tconstructor: newPersistentVolumeExpanderController,\n326: \t}\n327: \n737: \n738: func newPersistentVolumeProtectionControllerDescriptor() *ControllerDescriptor {\n739: \treturn &ControllerDescriptor{\n740: \t\tname:        names.PersistentVolumeProtectionController,\n741: \t\taliases:     []string{\"pv-protection\"},\n742: \t\tconstructor: newPersistentVolumeProtectionController,\n743: \t}\n744: \n708: \n709: func newPersistentVolumeClaimProtectionControllerDescriptor() *ControllerDescriptor {\n710: \treturn &ControllerDescriptor{\n711: \t\tname:        names.PersistentVolumeClaimProtectionController,\n712: \t\taliases:     []string{\"pvc-protection\"},\n713: \t\tconstructor: newPersistentVolumeClaimProtectionController,\n714: \t}\n715: \n\n# github.com/pytorch/pytorch – torch/fx/graph.py\n332: \n333: # get File:lineno code from stack_trace\n334: def _parse_stack_trace(\n335:     stack_trace: str, filter_fn: Callable[[str, str, str], bool] | None = None\n336: ) -> _ParsedStackTrace | None:\n337:     if stack_trace is None:\n338:         return None\n339: \n318: @dataclass(frozen=True)\n319: class _ParsedStackTrace:\n320:     \"\"\"\n321:     Represents the top-most frame of a parsed stack trace\n322:     \"\"\"\n323: \n247:     # Optional mapping from the forward function's line number to\n248:     # node index. Line number starts at the prologue (i.e. forward()).\n249:     _lineno_map: dict[int, int | None] | None\n250:     # The line number of prologue in fn_code\n251:     _prologue_start: int = 0\n252: \n253: \n\n# github.com/microsoft/vscode – src/vs/workbench/contrib/debug/browser/variablesView.ts\n336: \n337: function isStackFrame(obj: any): obj is IStackFrame {\n338: \treturn obj instanceof StackFrame;\n339: }\n340: \n67: \tprivate needsRefresh = false;\n68: \tprivate tree!: WorkbenchAsyncDataTree<IStackFrame | null, IExpression | IScope, FuzzyScore>;\n69: \tprivate savedViewState = new Map<string, IAsyncDataTreeViewState>();\n70: \tprivate autoExpandedScopes = new Set<string>();\n71: \n72: \n353: \n354: \tprotected override doGetChildren(element: IStackFrame | IExpression | IScope): Promise<(IExpression | IScope)[]> {\n355: \t\tif (isStackFrame(element)) {\n356: \t\t\treturn element.getScopes();\n357: \n\n# github.com/microsoft/vscode – src/vs/workbench/contrib/debug/browser/callStackView.ts\n139: \n140: async function expandTo(session: IDebugSession, tree: WorkbenchCompressibleAsyncDataTree<IDebugModel, CallStackItem, FuzzyScore>): Promise<void> {\n141: \tif (session.parentSession) {\n142: \t\tawait expandTo(session.parentSession, tree);\n143: \t}\n144: \tawait tree.expand(session);\n145: }\n146: \n514: \n515: interface IStackFrameTemplateData {\n516: \tstackFrame: HTMLElement;\n517: \tfile: HTMLElement;\n518: \n56: \n57: type CallStackItem = IStackFrame | IThread | IDebugSession | string | ThreadAndSessionIds | IStackFrame[];\n58: \n59: interface ICallStackItemContext {\n60: \tsessionId: string;\n61: \n\n# github.com/microsoft/vscode – src/vs/base/browser/ui/tree/asyncDataTree.ts\n926: \n927: \te...
115-systemthinking_tokens-
116-systemthinking_tokens-
117-systemthinking_tokens-
118-systemthinking_tokens-
119-assistanttext-
Let me search more directly for stack probe functions in the GCC i386 code.
120-assistanttool_usemcp__sourcegraph__sg_keyword_search
1212026-06-12T16:17:45.336Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
122-assistanttool_usemcp__sourcegraph__sg_keyword_search
1232026-06-12T16:17:45.822Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\n2071: void\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\n2073: {\n2074: \n2013: void\n2014: emit_stack_clash_protection_probe_loop_start (rtx *loop_lab,\n2015: \t\t\t\t\t      rtx *end_lab,\n2016: \n2035: void\n2036: emit_stack_clash_protection_probe_loop_end (rtx loop_lab, rtx end_loop,\n2037: \t\t\t\t\t    rtx last_addr, bool rotated)\n2038: \n"}
124-systemthinking_tokens-
125-systemthinking_tokens-
126-systemthinking_tokens-
127-systemthinking_tokens-
128-systemthinking_tokens-
129-systemthinking_tokens-
130-systemthinking_tokens-
131-systemthinking_tokens-
132-systemthinking_tokens-
133-assistanttext-
Now let me read the key files to extract exact symbols. I'll read them in parallel.
134-assistanttool_usemcp__sourcegraph__sg_read_file
1352026-06-12T16:17:53.219Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.cc%3FL2000-2220\n2000: \tfprintf (dump_file,\n2001: \t\t \"Stack clash skipped dynamic allocation and \"\n2002: \t\t \"probing residuals.\\n\");\n2003:     }\n2004: }\n2005: \n2006: /* Emit the start of an allocate/probe loop for stack\n2007:    clash protection.\n2008: \n2009:    LOOP_LAB and END_LAB are returned for use when we emit the\n2010:    end of the loop.\n2011: \n2012:    LAST addr is the value for SP which stops the loop.  */\n2013: void\n2014: emit_stack_clash_protection_probe_loop_start (rtx *loop_lab,\n2015: \t\t\t\t\t      rtx *end_lab,\n2016: \t\t\t\t\t      rtx last_addr,\n2017: \t\t\t\t\t      bool rotated)\n2018: {\n2019:   /* Essentially we want to emit any setup code, the top of loop\n2020:      label and the comparison at the top of the loop.  */\n2021:   *loop_lab = gen_label_rtx ();\n2022:   *end_lab = gen_label_rtx ();\n2023: \n2024:   emit_label (*loop_lab);\n2025:   if (!rotated)\n2026:     emit_cmp_and_jump_insns (stack_pointer_rtx, last_addr, EQ, NULL_RTX,\n2027: \t\t\t     Pmode, 1, *end_lab);\n2028: }\n2029: \n2030: /* Emit the end of a stack clash probing loop.\n2031: \n2032:    This consists of just the jump back to LOOP_LAB and\n2033:    emitting END_LOOP after the loop.  */\n2034: \n2035: void\n2036: emit_stack_clash_protection_probe_loop_end (rtx loop_lab, rtx end_loop,\n2037: \t\t\t\t\t    rtx last_addr, bool rotated)\n2038: {\n2039:   if (rotated)\n2040:     emit_cmp_and_jump_insns (stack_pointer_rtx, last_addr, NE, NULL_RTX,\n2041: \t\t\t     Pmode, 1, loop_lab);\n2042:   else\n2043:     emit_jump (loop_lab);\n2044: \n2045:   emit_label (end_loop);\n2046: \n2047: }\n2048: \n2049: /* Adjust the stack pointer by minus SIZE (an rtx for a number of bytes)\n2050:    while probing it.  This pushes when SIZE is positive.  SIZE need not\n2051:    be constant.\n2052: \n2053:    This is subtly different than anti_adjust_stack_and_probe to try and\n2054:    prevent stack-clash attacks\n2055: \n2056:      1. It must assume no knowledge of the probing state, any allocation\n2057: \tmust probe.\n2058: \n2059: \tConsider the case of a 1 byte alloca in a loop.  If the sum of the\n2060: \tallocations is large, then this could be used to jump the guard if\n2061: \tprobes were not emitted.\n2062: \n2063:      2. It never skips probes, whereas anti_adjust_stack_and_probe will\n2064: \tskip the probe on the first PROBE_INTERVAL on the assumption it\n2065: \twas already done in the prologue and in previous allocations.\n2066: \n2067:      3. It only allocates and probes SIZE bytes, it does not need to\n2068: \tallocate/probe beyond that because this probing style does not\n2069: \tguarantee signal handling capability if the guard is hit.  */\n2070: \n2071: void\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\n2073: {\n2074:   /* First ensure SIZE is Pmode.  */\n2075:   if (GET_MODE (size) != VOIDmode && GET_MODE (size) != Pmode)\n2076:     size = convert_to_mode (Pmode, size, 1);\n2077: \n2078:   /* We can get here with a constant size on some targets.  */\n2079:   rtx rounded_size, last_addr, residual;\n2080:   HOST_WIDE_INT probe_interval, probe_range;\n2081:   bool target_probe_range_p = false;\n2082:   compute_stack_clash_protection_loop_data (&rounded_size, &last_addr,\n2083: \t\t\t\t\t    &residual, &probe_interval, size);\n2084: \n2085:   /* Get the back-end specific probe ranges.  */\n2086:   probe_range = targetm.stack_clash_protection_alloca_probe_range ();\n2087:   target_probe_range_p = probe_range != 0;\n2088:   gcc_assert (probe_range >= 0);\n2089: \n2090:   /* If no back-end specific range defined, default to the top of the newly\n2091:      allocated range.  */\n2092:   if (probe_range == 0)\n2093:     probe_range = probe_interval - GET_MODE_SIZE (word_mode);\n2094: \n2095:   if (rounded_size != CONST0_RTX (Pmode))\n2096:     {\n2097:       if (CONST...
136-assistanttool_usemcp__sourcegraph__sg_read_file
1372026-06-12T16:17:54.300Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/common.opt%3FL3050-3060\n3050: fstack-check\n3051: Common Alias(fstack-check=, specific, no)\n3052: Insert stack checking code into the program.  Same as -fstack-check=specific.\n3053: \n3054: fstack-clash-protection\n3055: Common Var(flag_stack_clash_protection) Optimization\n3056: Insert code to probe each page of stack space as it is allocated to protect\n3057: from stack-clash style attacks.\n3058: \n3059: ; The real option is fno-stack-limit.\n3060: fstack-limit\n3061: "}
138-assistanttool_usemcp__sourcegraph__sg_read_file
1392026-06-12T16:17:55.160Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: int flag;\n5: void open();\n6: int getChar();\n7: typedef enum { QUOTE } CharType;\n8: typedef enum { UNQ } State;\n9: CharType getCharType();\n10: void expand() {\n11:   open();\n12:   if (flag)\n13:     return;\n14:   int ch = getChar();\n15:   State nextState = getCharType();\n16:   if (nextState)\n17:     while (ch)\n18:       ;\n19: }\n20: "}
140-systemthinking_tokens-
141-systemthinking_tokens-
142-systemthinking_tokens-
143-systemthinking_tokens-
144-systemthinking_tokens-
145-systemthinking_tokens-
146-systemthinking_tokens-
147-systemthinking_tokens-
148-assistanttext-
Let me now read the target.def and i386.cc to find the specific references.
149-assistanttool_usemcp__sourcegraph__sg_read_file
1502026-06-12T16:18:01.450Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL6525-6560\n6525: that shouldn't be used.\\n\\\n6526: \\n\\\n6527: (However, if this class is not included in @code{GENERAL_REGS} and all\\n\\\n6528: of the insn patterns whose constraints permit this class are\\n\\\n6529: controlled by target switches, then GCC will automatically avoid using\\n\\\n6530: these registers when the target switches are opposed to them.)\",\n6531:  void, (void),\n6532:  hook_void_void)\n6533: \n6534: DEFHOOK\n6535: (stack_clash_protection_alloca_probe_range,\n6536:  \"Some targets have an ABI defined interval for which no probing needs to be done.\\n\\\n6537: When a probe does need to be done this same interval is used as the probe distance\\n\\\n6538: up when doing stack clash protection for alloca.\\n\\\n6539: On such targets this value can be set to override the default probing up interval.\\n\\\n6540: Define this variable to return nonzero if such a probe range is required or zero otherwise.\\n\\\n6541: Defining this hook also requires your functions which make use of alloca to have at least 8 byes\\n\\\n6542: of outgoing arguments.  If this is not the case the stack will be corrupted.\\n\\\n6543: You need not define this macro if it would always have the value zero.\",\n6544:  HOST_WIDE_INT, (void),\n6545:  default_stack_clash_protection_alloca_probe_range)\n6546: \n6547: \n6548: /* Functions specific to the C family of frontends.  */\n6549: #undef HOOK_PREFIX\n6550: #define HOOK_PREFIX \"TARGET_C_\"\n6551: HOOK_VECTOR (TARGET_C, c)\n6552: \n6553: /* ??? Documenting this hook requires a GFDL license grant.  */\n6554: DEFHOOK_UNDOC\n6555: (mode_for_suffix,\n6556: \"Return machine mode for non-standard constant literal suffix @var{c},\\\n6557:  or VOIDmode if non-standard suffixes are unsupported.\",\n6558:  machine_mode, (char c),\n6559:  default_mode_for_suffix)\n6560: \n6561: "}
151-assistanttool_usemcp__sourcegraph__sg_keyword_search
1522026-06-12T16:18:02.138Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
153-systemthinking_tokens-
154-systemthinking_tokens-
155-systemthinking_tokens-
156-systemthinking_tokens-
157-systemthinking_tokens-
158-assistanttool_usemcp__sourcegraph__sg_read_file
1592026-06-12T16:18:06.023Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-100\n1: /* Subroutines used for code generation on IA-32.\n2:    Copyright (C) 1988-2026 Free Software Foundation, Inc.\n3: \n4: This file is part of GCC.\n5: \n6: GCC is free software; you can redistribute it and/or modify\n7: it under the terms of the GNU General Public License as published by\n8: the Free Software Foundation; either version 3, or (at your option)\n9: any later version.\n10: \n11: GCC is distributed in the hope that it will be useful,\n12: but WITHOUT ANY WARRANTY; without even the implied warranty of\n13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n14: GNU General Public License for more details.\n15: \n16: You should have received a copy of the GNU General Public License\n17: along with GCC; see the file COPYING3.  If not see\n18: <http://www.gnu.org/licenses/>.  */\n19: \n20: #define INCLUDE_STRING\n21: #define IN_TARGET_CODE 1\n22: \n23: #include \"config.h\"\n24: #include \"system.h\"\n25: #include \"coretypes.h\"\n26: #include \"backend.h\"\n27: #include \"rtl.h\"\n28: #include \"tree.h\"\n29: #include \"memmodel.h\"\n30: #include \"gimple.h\"\n31: #include \"cfghooks.h\"\n32: #include \"cfgloop.h\"\n33: #include \"df.h\"\n34: #include \"tm_p.h\"\n35: #include \"stringpool.h\"\n36: #include \"expmed.h\"\n37: #include \"optabs.h\"\n38: #include \"regs.h\"\n39: #include \"emit-rtl.h\"\n40: #include \"recog.h\"\n41: #include \"cgraph.h\"\n42: #include \"diagnostic.h\"\n43: #include \"cfgbuild.h\"\n44: #include \"alias.h\"\n45: #include \"fold-const.h\"\n46: #include \"attribs.h\"\n47: #include \"calls.h\"\n48: #include \"stor-layout.h\"\n49: #include \"varasm.h\"\n50: #include \"output.h\"\n51: #include \"insn-attr.h\"\n52: #include \"flags.h\"\n53: #include \"except.h\"\n54: #include \"explow.h\"\n55: #include \"expr.h\"\n56: #include \"cfgrtl.h\"\n57: #include \"common/common-target.h\"\n58: #include \"langhooks.h\"\n59: #include \"reload.h\"\n60: #include \"gimplify.h\"\n61: #include \"dwarf2.h\"\n62: #include \"tm-constrs.h\"\n63: #include \"cselib.h\"\n64: #include \"sched-int.h\"\n65: #include \"opts.h\"\n66: #include \"tree-pass.h\"\n67: #include \"context.h\"\n68: #include \"pass_manager.h\"\n69: #include \"target-globals.h\"\n70: #include \"gimple-iterator.h\"\n71: #include \"gimple-fold.h\"\n72: #include \"tree-vectorizer.h\"\n73: #include \"shrink-wrap.h\"\n74: #include \"builtins.h\"\n75: #include \"rtl-iter.h\"\n76: #include \"tree-iterator.h\"\n77: #include \"dbgcnt.h\"\n78: #include \"case-cfn-macros.h\"\n79: #include \"dojump.h\"\n80: #include \"fold-const-call.h\"\n81: #include \"tree-vrp.h\"\n82: #include \"tree-ssanames.h\"\n83: #include \"selftest.h\"\n84: #include \"selftest-rtl.h\"\n85: #include \"print-rtl.h\"\n86: #include \"intl.h\"\n87: #include \"ifcvt.h\"\n88: #include \"symbol-summary.h\"\n89: #include \"sreal.h\"\n90: #include \"ipa-cp.h\"\n91: #include \"ipa-prop.h\"\n92: #include \"ipa-fnsummary.h\"\n93: #include \"wide-int-bitmask.h\"\n94: #include \"tree-vector-builder.h\"\n95: #include \"debug.h\"\n96: #include \"dwarf2out.h\"\n97: #include \"i386-options.h\"\n98: #include \"i386-builtins.h\"\n99: #include \"i386-expand.h\"\n100: #include \"i386-features.h\"\n101: "}
160-systemthinking_tokens-
161-systemthinking_tokens-
162-systemthinking_tokens-
163-systemthinking_tokens-
164-systemthinking_tokens-
165-systemthinking_tokens-
166-systemthinking_tokens-
167-systemthinking_tokens-
168-systemthinking_tokens-
169-systemthinking_tokens-
170-systemthinking_tokens-
171-assistanttool_usemcp__sourcegraph__sg_keyword_search
1722026-06-12T16:18:12.347Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n21106:   \"\"\n21107:   \"ix86_expand_prologue (); DONE;\")\n21108: \n21109: \n"}
173-systemthinking_tokens-
174-systemthinking_tokens-
175-assistanttool_usemcp__sourcegraph__sg_keyword_search
1762026-06-12T16:18:15.594Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n"}
177-systemthinking_tokens-
178-systemthinking_tokens-
179-systemthinking_tokens-
180-systemthinking_tokens-
181-systemthinking_tokens-
182-assistanttool_usemcp__sourcegraph__sg_keyword_search
1832026-06-12T16:18:19.488Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
184-assistanttool_usemcp__sourcegraph__sg_keyword_search
1852026-06-12T16:18:19.833Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-logue.cc\n1553: static rtx_insn *\n1554: rs6000_emit_probe_stack_range_stack_clash (HOST_WIDE_INT orig_size,\n1555: \t\t\t\t\t   rtx copy_reg)\n1556: \n1950: static const char *\n1951: output_probe_stack_range_stack_clash (rtx reg1, rtx reg2, rtx reg3)\n1952: {\n1953: \n1529: static HOST_WIDE_INT\n1530: get_stack_clash_protection_probe_interval (void)\n1531: {\n1532: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64.h\n102:    before probing has to be done for stack clash protection.  */\n103: #define STACK_CLASH_CALLER_GUARD 1024\n104: \n105: \n106:    outgoing arguments to be when stack-clash is enabled.  */\n107: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\n108: \n109: \n110:    generating stack clash probes.  */\n111: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n112: \n113: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.h\n1305:    before probing has to be done for stack clash protection.  */\n1306: #define STACK_CLASH_CALLER_GUARD 1024\n1307: \n1308: \n1309:    generating stack clash probes.  */\n1310: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n1311: \n1312: \n1313:    outgoing arguments to be when stack-clash is enabled.  */\n1314: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\n1315: \n1316: /* Allocate a minimum of STACK_CLASH_MIN_BYTES_OUTGOING_ARGS bytes for the\n1317:    outgoing arguments if stack clash protection is enabled.  This is essential\n1318: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.h\n672:    generating stack clash probes.  */\n673: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n674: \n675: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.cc\n265: /* Size of guard page.  */\n266: #define STACK_CLASH_PROTECTION_GUARD_SIZE \\\n267:   (1 << param_stack_clash_protection_guard_size)\n268: \n269: \n1108:   if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK\n1109:       || (flag_stack_clash_protection\n1110: \t  && frame->total_size > STACK_CLASH_PROTECTION_GUARD_SIZE))\n1111:     return min_first_step;\n1112: \n1152: \n1153:   if (flag_stack_clash_protection)\n1154:     interval = STACK_CLASH_PROTECTION_GUARD_SIZE;\n1155:   else\n1156: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n15598: static HOST_WIDE_INT\n15599: riscv_stack_clash_protection_alloca_probe_range (void)\n15600: {\n15601:   return STACK_CLASH_CALLER_GUARD;\n15602: }\n15603: \n16846: \n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n16851: \n9521:   emit_stack_probe (plus_constant (Pmode, stack_pointer_rtx,\n9522: \t\t    STACK_CLASH_CALLER_GUARD));\n9523:   emit_insn (gen_blockage ());\n9524: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/configure.ac\n891: [Set the default stack clash protection guard size for specific targets as a power of two in bytes.])],\n892: [DEFAULT_STK_CLASH_GUARD_SIZE=\"$with_stack_clash_protection_guard_size\"], [DEFAULT_STK_CLASH_GUARD_SIZE=0])\n893: if test $DEFAULT_STK_CLASH_GUARD_SIZE -ne 0 \\\n894: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/alpha/alpha.cc\n8478:   probed_size = frame_size;\n8479:   if (flag_stack_check || flag_stack_clash_protection)\n8480:     probed_size += get_stack_check_protect ();\n8481: \n8493: \t  if ((sa_size == 0 && probed_size > probed - 4096)\n8494: \t      || flag_stack_check || flag_stack_clash_protection)\n8495: \t    emit_insn (gen_stack_probe_internal (GEN_INT (-probed_size)));\n8496: \n8524:       if ((leftover > 4096 && sa_size == 0)\n8525: \t  || flag_stack_check || flag_stack_clash_protection)\n8526: \t{\n8527: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips.cc\n12625:   if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK\n12626:       || flag_stack_clash_protection)\n12627:     {\n12628: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/...
186-systemthinking_tokens-
187-systemthinking_tokens-
188-systemthinking_tokens-
189-systemthinking_tokens-
190-systemthinking_tokens-
191-systemthinking_tokens-
192-systemthinking_tokens-
193-assistanttool_usemcp__sourcegraph__sg_keyword_search
1942026-06-12T16:18:26.033Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
195-assistanttool_usemcp__sourcegraph__sg_keyword_search
1962026-06-12T16:18:26.315Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
197-systemthinking_tokens-
198-systemthinking_tokens-
199-systemthinking_tokens-
200-systemthinking_tokens-
201-systemthinking_tokens-
202-systemthinking_tokens-
203-systemthinking_tokens-
204-systemthinking_tokens-
205-systemthinking_tokens-
206-systemthinking_tokens-
207-systemthinking_tokens-
208-systemthinking_tokens-
209-assistanttool_usemcp__sourcegraph__sg_keyword_search
2102026-06-12T16:18:33.282Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n105: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n233:   UNSPECV_STACK_PROBE\n234:   UNSPECV_PROBE_STACK_RANGE\n235:   UNSPECV_ALIGN\n236: \n27820: \t(unspec_volatile:P [(match_operand:P 1 \"register_operand\" \"0\")]\n27821: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27822:    (set (reg:P SP_REG)\n27823: \n27833: \t\t\t    (match_operand:P 2 \"const_int_operand\")]\n27834: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27835:    (clobber (reg:CC FLAGS_REG))]\n27836: \n"}
211-assistanttool_usemcp__sourcegraph__sg_keyword_search
2122026-06-12T16:18:33.630Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
213-systemthinking_tokens-
214-systemthinking_tokens-
215-systemthinking_tokens-
216-assistanttool_usemcp__sourcegraph__sg_keyword_search
2172026-06-12T16:18:36.894Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
218-assistanttool_usemcp__sourcegraph__sg_keyword_search
2192026-06-12T16:18:39.134Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n105: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-logue.cc\n1872: static const char *\n1873: output_probe_stack_range_1 (rtx reg1, rtx reg2)\n1874: {\n1875: \n1986: \n1987: /* Wrapper around the output_probe_stack_range routines.  */\n1988: const char *\n1989: output_probe_stack_range (rtx reg1, rtx reg2, rtx reg3)\n1990: {\n1991: \n1950: static const char *\n1951: output_probe_stack_range_stack_clash (rtx reg1, rtx reg2, rtx reg3)\n1952: {\n1953: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64-protos.h\n61: extern const char *get_bundle_name (int);\n62: extern const char *output_probe_stack_range (rtx, rtx);\n63: \n64: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/sparc/sparc-protos.h\n80: extern const char *output_v9branch (rtx, rtx, int, int, int, int, rtx_insn *);\n81: extern const char *output_probe_stack_range (rtx, rtx);\n82: extern const char *output_cbcond (rtx, rtx, rtx_insn *);\n83: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch-protos.h\n148: extern const char *loongarch_lsx_output_division (const char *, rtx *);\n149: extern const char *loongarch_output_probe_stack_range (rtx, rtx, rtx);\n150: extern bool loongarch_hard_regno_rename_ok (unsigned int, unsigned int);\n151: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips-protos.h\n320: extern const char *mips_msa_output_shift_immediate (const char *, rtx *);\n321: extern const char *mips_output_probe_stack_range (rtx, rtx);\n322: extern bool mips_hard_regno_rename_ok (unsigned int, unsigned int);\n323: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-protos.h\n123: extern char * output_cbranch (rtx, const char *, int, rtx_insn *);\n124: extern const char * output_probe_stack_range (rtx, rtx, rtx);\n125: extern void rs6000_emit_dot_insn (rtx dst, rtx src, int dot, rtx ccreg);\n126: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/arm/arm-protos.h\n178: extern const char *output_return_instruction (rtx, bool, bool, bool);\n179: extern const char *output_probe_stack_range (rtx, rtx);\n180: extern void arm_poke_function_name (FILE *, const char *);\n181: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64-protos.h\n1028: const char * aarch64_gen_far_branch (rtx *, int, const char *, const char *);\n1029: const char * aarch64_output_probe_stack_range (rtx, rtx);\n1030: const char * aarch64_output_probe_sve_stack_clash (rtx, rtx, rtx, rtx);\n1031: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64.cc\n3443: const char *\n3444: output_probe_stack_range (rtx reg1, rtx reg2)\n3445: {\n3446: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.cc\n1259: const char *\n1260: loongarch_output_probe_stack_range (rtx reg1, rtx reg2, rtx reg3)\n1261: {\n1262: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/sparc/sparc.cc\n5728: const char *\n5729: output_probe_stack_range (rtx reg1, rtx reg2)\n5730: {\n5731: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips.cc\n12551: const char *\n12552: mips_output_probe_stack_range (rtx reg1, rtx reg2)\n12553: {\n12554: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.md\n3931: {\n3932:   return loongarch_output_probe_stack_range (operands[0],\n3933: \t\t\t\t\t     operands[2],\n3934: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64.md\n5236:   \"\"\n5237:   \"* return output_probe_stack_range (operands[0], operands[2]);\"\n5238:   [(set_attr \"itanium_class\" \"unknown\")\n5239: \n"}
220-systemthinking_tokens-
221-systemthinking_tokens-
222-systemthinking_tokens-
223-systemthinking_tokens-
224-systemthinking_tokens-
225-systemthinking_tokens-
226-systemthinking_tokens-
227-systemthinking_tokens-
228-assistanttool_usemcp__sourcegraph__sg_keyword_search
2292026-06-12T16:18:44.625Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
230-assistanttool_usemcp__sourcegraph__sg_keyword_search
2312026-06-12T16:18:45.194Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
232-systemthinking_tokens-
233-systemthinking_tokens-
234-assistanttool_usemcp__sourcegraph__sg_keyword_search
2352026-06-12T16:18:48.078Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n"}
236-systemthinking_tokens-
237-systemthinking_tokens-
238-systemthinking_tokens-
239-systemthinking_tokens-
240-systemthinking_tokens-
241-assistanttool_usemcp__sourcegraph__sg_read_file
2422026-06-12T16:18:51.971Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.md%3FL27800-27850\n27800: {\n27801:   emit_insn (gen_probe_stack_1\n27802: \t     (word_mode, operands[0], const0_rtx));\n27803:   DONE;\n27804: })\n27805: \n27806: ;; Use OR for stack probes, this is shorter.\n27807: (define_insn \"@probe_stack_1_<mode>\"\n27808:   [(set (match_operand:W 0 \"memory_operand\" \"=m\")\n27809: \t(unspec:W [(match_operand:W 1 \"const0_operand\")]\n27810: \t\t  UNSPEC_PROBE_STACK))\n27811:    (clobber (reg:CC FLAGS_REG))]\n27812:   \"\"\n27813:   \"or{<imodesuffix>}\\t{%1, %0|%0, %1}\"\n27814:   [(set_attr \"type\" \"alu1\")\n27815:    (set_attr \"mode\" \"<MODE>\")\n27816:    (set_attr \"length_immediate\" \"1\")])\n27817:   \n27818: (define_insn \"@adjust_stack_and_probe_<mode>\"\n27819:   [(set (match_operand:P 0 \"register_operand\" \"=r\")\n27820: \t(unspec_volatile:P [(match_operand:P 1 \"register_operand\" \"0\")]\n27821: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27822:    (set (reg:P SP_REG)\n27823:         (minus:P (reg:P SP_REG) (match_operand:P 2 \"const_int_operand\")))\n27824:    (clobber (reg:CC FLAGS_REG))\n27825:    (clobber (mem:BLK (scratch)))]\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n27830: (define_insn \"@probe_stack_range_<mode>\"\n27831:   [(set (match_operand:P 0 \"register_operand\" \"=r\")\n27832: \t(unspec_volatile:P [(match_operand:P 1 \"register_operand\" \"0\")\n27833: \t\t\t    (match_operand:P 2 \"const_int_operand\")]\n27834: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27835:    (clobber (reg:CC FLAGS_REG))]\n27836:   \"\"\n27837:   \"* return output_probe_stack_range (operands[0], operands[2]);\"\n27838:   [(set_attr \"type\" \"multi\")])\n27839: \n27840: (define_expand \"builtin_setjmp_receiver\"\n27841:   [(label_ref (match_operand 0))]\n27842:   \"!TARGET_64BIT && flag_pic\"\n27843: {\n27844: #if TARGET_MACHO\n27845:   if (TARGET_MACHO)\n27846:     {\n27847:       rtx xops[3];\n27848:       rtx_code_label *label_rtx = gen_label_rtx ();\n27849:       emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx));\n27850:       xops[0] = xops[1] = pic_offset_table_rtx;\n27851: "}
243-systemthinking_tokens-
244-systemthinking_tokens-
245-systemthinking_tokens-
246-systemthinking_tokens-
247-systemthinking_tokens-
248-systemthinking_tokens-
249-systemthinking_tokens-
250-systemthinking_tokens-
251-assistanttext-
Let me read more of i386.cc to find the stack probe function definitions.
252-assistanttool_usemcp__sourcegraph__sg_keyword_search
2532026-06-12T16:18:58.058Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
254-systemthinking_tokens-
255-systemthinking_tokens-
256-systemthinking_tokens-
257-systemthinking_tokens-
258-systemthinking_tokens-
259-systemthinking_tokens-
260-systemthinking_tokens-
261-systemthinking_tokens-
262-systemthinking_tokens-
263-assistanttool_usemcp__sourcegraph__sg_keyword_search
2642026-06-12T16:19:03.880Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n96: \n97: extern const char *output_set_got (rtx, rtx);\n98: extern const char *output_387_binary_op (rtx_insn *, rtx*);\n99: extern const char *output_387_reg_move (rtx_insn *, rtx*);\n100: extern const char *output_fix_trunc (rtx_insn *, rtx*, bool);\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n105: \n320: /* In winnt.cc  */\n321: extern void i386_pe_record_external_function (tree, const char *);\n322: extern bool i386_pe_binds_local_p (const_tree);\n323: extern const char *i386_pe_strip_name_encoding_full (const char *);\n324: extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,\n325: \t\t\t\t\t\t    const char *,\n326: \t\t\t\t\t\t    HOST_WIDE_INT,\n327: \n201: extern bool ix86_function_arg_regno_p (int);\n202: extern void ix86_asm_output_function_label (FILE *, const char *, tree);\n203: extern void ix86_asm_output_labelref (FILE *, const char *, const char *);\n204: extern void ix86_call_abi_override (const_tree);\n205: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n3165:   char buf[128];\n3166:   const char *ops;\n3167:   const char *suffix;\n3168: \n3169: \n29664: {\n29665:   static const char * const patterns[4] = {\n29666:    \"prefetchnta\\t%a0\", \"prefetcht2\\t%a0\", \"prefetcht1\\t%a0\", \"prefetcht0\\t%a0\"\n29667: \n29701: {\n29702:   static const char * const patterns[2] = {\n29703:     \"prefetchit1\\t%a0\", \"prefetchit0\\t%a0\"\n29704: \n"}
265-systemthinking_tokens-
266-systemthinking_tokens-
267-systemthinking_tokens-
268-systemthinking_tokens-
269-systemthinking_tokens-
270-systemthinking_tokens-
271-assistanttool_usemcp__sourcegraph__sg_keyword_search
2722026-06-12T16:19:08.140Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n"}
273-systemthinking_tokens-
274-systemthinking_tokens-
275-systemthinking_tokens-
276-systemthinking_tokens-
277-systemthinking_tokens-
278-systemthinking_tokens-
279-systemthinking_tokens-
280-systemthinking_tokens-
281-systemthinking_tokens-
282-systemthinking_tokens-
283-systemthinking_tokens-
284-assistanttext-
Let me read i386.cc in sections to find where the stack probe functions are defined.
285-assistanttool_usemcp__sourcegraph__sg_read_file
2862026-06-12T16:19:16.854Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-50\n1: /* Subroutines used for code generation on IA-32.\n2:    Copyright (C) 1988-2026 Free Software Foundation, Inc.\n3: \n4: This file is part of GCC.\n5: \n6: GCC is free software; you can redistribute it and/or modify\n7: it under the terms of the GNU General Public License as published by\n8: the Free Software Foundation; either version 3, or (at your option)\n9: any later version.\n10: \n11: GCC is distributed in the hope that it will be useful,\n12: but WITHOUT ANY WARRANTY; without even the implied warranty of\n13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n14: GNU General Public License for more details.\n15: \n16: You should have received a copy of the GNU General Public License\n17: along with GCC; see the file COPYING3.  If not see\n18: <http://www.gnu.org/licenses/>.  */\n19: \n20: #define INCLUDE_STRING\n21: #define IN_TARGET_CODE 1\n22: \n23: #include \"config.h\"\n24: #include \"system.h\"\n25: #include \"coretypes.h\"\n26: #include \"backend.h\"\n27: #include \"rtl.h\"\n28: #include \"tree.h\"\n29: #include \"memmodel.h\"\n30: #include \"gimple.h\"\n31: #include \"cfghooks.h\"\n32: #include \"cfgloop.h\"\n33: #include \"df.h\"\n34: #include \"tm_p.h\"\n35: #include \"stringpool.h\"\n36: #include \"expmed.h\"\n37: #include \"optabs.h\"\n38: #include \"regs.h\"\n39: #include \"emit-rtl.h\"\n40: #include \"recog.h\"\n41: #include \"cgraph.h\"\n42: #include \"diagnostic.h\"\n43: #include \"cfgbuild.h\"\n44: #include \"alias.h\"\n45: #include \"fold-const.h\"\n46: #include \"attribs.h\"\n47: #include \"calls.h\"\n48: #include \"stor-layout.h\"\n49: #include \"varasm.h\"\n50: #include \"output.h\"\n51: "}
287-systemthinking_tokens-
288-systemthinking_tokens-
289-systemthinking_tokens-
290-systemthinking_tokens-
291-systemthinking_tokens-
292-systemthinking_tokens-
293-systemthinking_tokens-
294-systemthinking_tokens-
295-systemthinking_tokens-
296-systemthinking_tokens-
297-assistanttool_useToolSearch
2982026-06-12T16:19:22.579Zusertool_resultToolSearch
{"matches": ["mcp__sourcegraph__sg_go_to_definition"], "query": "select:mcp__sourcegraph__sg_go_to_definition", "total_deferred_tools": 33}
299-systemthinking_tokens-
300-systemthinking_tokens-
301-systemthinking_tokens-
302-assistanttool_usemcp__sourcegraph__sg_go_to_definition
303-assistanttool_usemcp__sourcegraph__sg_go_to_definition
3042026-06-12T16:19:27.046Zusertool_resultmcp__sourcegraph__sg_go_to_definition
{"text":"No results.\n\nno definition found for symbol 'output_adjust_stack_and_probe'."}
3052026-06-12T16:19:27.162Zusertool_resultmcp__sourcegraph__sg_go_to_definition
{"text":"No results.\n\nno definition found for symbol 'output_probe_stack_range'."}
306-systemthinking_tokens-
307-systemthinking_tokens-
308-systemthinking_tokens-
309-systemthinking_tokens-
310-systemthinking_tokens-
311-systemthinking_tokens-
312-systemthinking_tokens-
313-systemthinking_tokens-
314-systemthinking_tokens-
315-systemthinking_tokens-
316-systemthinking_tokens-
317-systemthinking_tokens-
318-systemthinking_tokens-
319-systemthinking_tokens-
320-systemthinking_tokens-
321-systemthinking_tokens-
322-systemthinking_tokens-
323-systemthinking_tokens-
324-systemthinking_tokens-
325-systemthinking_tokens-
326-systemthinking_tokens-
327-systemthinking_tokens-
328-systemthinking_tokens-
329-systemthinking_tokens-
330-assistanttext-
Let me search for the `TARGET_STACK_CLASH_PROTECTION` header declaration and also read explow.h.
331-assistanttool_usemcp__sourcegraph__sg_read_file
3322026-06-12T16:19:46.314Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.h\n1: /* Export function prototypes from explow.cc.\n2:    Copyright (C) 2015-2026 Free Software Foundation, Inc.\n3: \n4: This file is part of GCC.\n5: \n6: GCC is free software; you can redistribute it and/or modify it under\n7: the terms of the GNU General Public License as published by the Free\n8: Software Foundation; either version 3, or (at your option) any later\n9: version.\n10: \n11: GCC is distributed in the hope that it will be useful, but WITHOUT ANY\n12: WARRANTY; without even the implied warranty of MERCHANTABILITY or\n13: FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\n14: for more details.\n15: \n16: You should have received a copy of the GNU General Public License\n17: along with GCC; see the file COPYING3.  If not see\n18: <http://www.gnu.org/licenses/>.  */\n19: \n20: #ifndef GCC_EXPLOW_H\n21: #define GCC_EXPLOW_H\n22: \n23: /* Return a memory reference like MEMREF, but which is known to have a\n24:    valid address.  */\n25: extern rtx validize_mem (rtx);\n26: \n27: extern rtx use_anchored_address (rtx);\n28: \n29: /* Copy given rtx to a new temp reg and return that.  */\n30: extern rtx copy_to_reg (rtx);\n31: \n32: /* Like copy_to_reg but always make the reg Pmode.  */\n33: extern rtx copy_addr_to_reg (rtx);\n34: \n35: /* Like copy_to_reg but always make the reg the specified mode MODE.  */\n36: extern rtx copy_to_mode_reg (machine_mode, rtx);\n37: \n38: /* Copy given rtx to given temp reg and return that.  */\n39: extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);\n40: \n41: /* Copy a value to a register if it isn't already a register.\n42:    Args are mode (in case value is a constant) and the value.  */\n43: extern rtx force_reg (machine_mode, rtx);\n44: \n45: extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);\n46: extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);\n47: extern rtx force_highpart_subreg (machine_mode, rtx, machine_mode);\n48: \n49: /* Return given rtx, copied into a new temp reg if it was in memory.  */\n50: extern rtx force_not_mem (rtx);\n51: \n52: /* Return mode and signedness to use when an argument or result in the\n53:    given mode is promoted.  */\n54: extern machine_mode promote_function_mode (const_tree, machine_mode, int *,\n55: \t\t\t\t\t        const_tree, int);\n56: \n57: /* Return mode and signedness to use when an object in the given mode\n58:    is promoted.  */\n59: extern machine_mode promote_mode (const_tree, machine_mode, int *);\n60: \n61: /* Return mode and signedness to use when object is promoted.  */\n62: machine_mode promote_decl_mode (const_tree, int *);\n63: \n64: /* Return mode and signedness to use when object is promoted.  */\n65: machine_mode promote_ssa_mode (const_tree, int *);\n66: \n67: /* Remove some bytes from the stack.  An rtx says how many.  */\n68: extern void adjust_stack (rtx);\n69: \n70: /* Add some bytes to the stack.  An rtx says how many.  */\n71: extern void anti_adjust_stack (rtx);\n72: \n73: /* Add some bytes to the stack while probing it.  An rtx says how many. */\n74: extern void anti_adjust_stack_and_probe (rtx, bool);\n75: \n76: /* Add some bytes to the stack while probing it.  An rtx says how\n77:    many.  Add additional probes to prevent stack clashing attacks.  */\n78: extern void anti_adjust_stack_and_probe_stack_clash (rtx);\n79: \n80: /* Support for building allocation/probing loops for stack-clash\n81:    protection of dyamically allocated stack space.  */\n82: extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,\n83: \t\t\t\t\t\t      HOST_WIDE_INT *, rtx);\n84: extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,\n85: \t\t\t\t\t\t\t  rtx, bool);\n86: extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx,\n87: \t\t\t\t\t\t\trtx, bool);\n88: \n89: /* This enum is used for ...
333-assistanttool_usemcp__sourcegraph__sg_keyword_search
3342026-06-12T16:19:47.182Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.h\n77:    many.  Add additional probes to prevent stack clashing attacks.  */\n78: extern void anti_adjust_stack_and_probe_stack_clash (rtx);\n79: \n80: \n81:    protection of dyamically allocated stack space.  */\n82: extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,\n83: \t\t\t\t\t\t      HOST_WIDE_INT *, rtx);\n84: extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,\n85: \t\t\t\t\t\t\t  rtx, bool);\n86: extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx,\n87: \t\t\t\t\t\t\trtx, bool);\n88: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64.h\n102:    before probing has to be done for stack clash protection.  */\n103: #define STACK_CLASH_CALLER_GUARD 1024\n104: \n105: \n110:    generating stack clash probes.  */\n111: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n112: \n113: \n106:    outgoing arguments to be when stack-clash is enabled.  */\n107: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\n108: \n109: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/sve/pcs/stack_clash_3.c\n\n# github.com/sg-evals/gcc--96dfb333 – gcc/function.h\n639: \n640: enum stack_clash_probes {\n641:   NO_PROBE_NO_FRAME,\n642: \n646: \n647: extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);\n648: \f\n649: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.h\n1305:    before probing has to be done for stack clash protection.  */\n1306: #define STACK_CLASH_CALLER_GUARD 1024\n1307: \n1308: \n1309:    generating stack clash probes.  */\n1310: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n1311: \n1312: \n1313:    outgoing arguments to be when stack-clash is enabled.  */\n1314: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\n1315: \n1316: /* Allocate a minimum of STACK_CLASH_MIN_BYTES_OUTGOING_ARGS bytes for the\n1317:    outgoing arguments if stack clash protection is enabled.  This is essential\n1318: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.h\n672:    generating stack clash probes.  */\n673: #define STACK_CLASH_MAX_UNROLL_PAGES 4\n674: \n675: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C\n2: // { dg-additional-options \"-fstack-protector-strong\" { target fstack_protector } }\n3: // { dg-additional-options \"-fstack-clash-protection\" { target supports_stack_clash_protection } }\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-1.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-3.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-a...
335-systemthinking_tokens-
336-systemthinking_tokens-
337-systemthinking_tokens-
338-systemthinking_tokens-
339-systemthinking_tokens-
340-systemthinking_tokens-
341-systemthinking_tokens-
342-systemthinking_tokens-
343-systemthinking_tokens-
344-systemthinking_tokens-
345-assistanttext-
Now let me search for the header where `TARGET_STACK_CLASH_PROTECTION` is declared.
346-assistanttool_usemcp__sourcegraph__sg_keyword_search
3472026-06-12T16:19:57.208Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n"}
348-assistanttool_usemcp__sourcegraph__sg_keyword_search
3492026-06-12T16:19:57.742Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
350-systemthinking_tokens-
351-systemthinking_tokens-
352-systemthinking_tokens-
353-assistanttool_usemcp__sourcegraph__sg_keyword_search
3542026-06-12T16:20:00.786Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
355-systemthinking_tokens-
356-systemthinking_tokens-
357-systemthinking_tokens-
358-assistanttool_usemcp__sourcegraph__sg_keyword_search
3592026-06-12T16:20:04.406Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
360-assistanttool_usemcp__sourcegraph__sg_keyword_search
3612026-06-12T16:20:04.832Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
362-systemthinking_tokens-
363-systemthinking_tokens-
364-systemthinking_tokens-
365-assistanttool_usemcp__sourcegraph__sg_read_file
3662026-06-12T16:20:08.279Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.h%3FL295-310\n295: \t\t\t\t       optimization_type);\n296: extern unsigned int default_max_noce_ifcvt_seq_cost (edge);\n297: extern bool default_noce_conversion_profitable_p (rtx_insn *,\n298: \t\t\t\t\t\t  struct noce_if_info *);\n299: extern unsigned int default_min_arithmetic_precision (void);\n300: \n301: extern enum flt_eval_method\n302: default_excess_precision (enum excess_precision_type ATTRIBUTE_UNUSED);\n303: extern bool default_bitint_type_info (int, struct bitint_info *);\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\n306: extern void default_select_early_remat_modes (sbitmap);\n307: extern tree default_preferred_else_value (unsigned, tree, unsigned, tree *);\n308: extern bool default_instruction_selection (function *, gimple_stmt_iterator *);\n309: extern bool default_have_speculation_safe_value (bool);\n310: extern bool speculation_safe_value_not_needed (bool);\n311: "}
367-assistanttool_usemcp__sourcegraph__sg_read_file
3682026-06-12T16:20:09.332Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.cc%3FL2740-2760\n2740: {\n2741:   return false;\n2742: }\n2743: \n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: default_stack_clash_protection_alloca_probe_range (void)\n2748: {\n2749:   return 0;\n2750: }\n2751: \n2752: /* The default implementation of TARGET_EARLY_REMAT_MODES.  */\n2753: \n2754: void\n2755: default_select_early_remat_modes (sbitmap)\n2756: {\n2757: }\n2758: \n2759: /* The default implementation of TARGET_PREFERRED_ELSE_VALUE.  */\n2760: \n2761: "}
369-systemthinking_tokens-
370-systemthinking_tokens-
371-systemthinking_tokens-
372-systemthinking_tokens-
373-systemthinking_tokens-
374-systemthinking_tokens-
375-systemthinking_tokens-
376-systemthinking_tokens-
377-systemthinking_tokens-
378-systemthinking_tokens-
379-systemthinking_tokens-
380-systemthinking_tokens-
381-systemthinking_tokens-
382-systemthinking_tokens-
383-systemthinking_tokens-
384-systemthinking_tokens-
385-systemthinking_tokens-
386-assistanttool_usemcp__sourcegraph__sg_keyword_search
387-assistanttool_usemcp__sourcegraph__sg_keyword_search
3882026-06-12T16:20:22.667Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/lib/target-supports.exp\n13633: #\n13634: proc check_effective_target_supports_stack_clash_protection { } {\n13635: \n13636: \n"}
3892026-06-12T16:20:22.704Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.dg/torture/pr82823.C\n2: // { dg-additional-options \"-fstack-clash-protection\" }\n3: // { dg-require-effective-target supports_stack_clash_protection }\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.dg/torture/pr119610.C\n2: // { dg-additional-options \"-fstack-protector-strong\" { target fstack_protector } }\n3: // { dg-additional-options \"-fstack-clash-protection\" { target supports_stack_clash_protection } }\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-alloca-2.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C\n2: // { dg-additional-options \"-fstack-protector-strong\" { target fstack_protector } }\n3: // { dg-additional-options \"-fstack-clash-protection\" { target supports_stack_clash_protection } }\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-1.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-2.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-alloca-3.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-3.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-1.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.dg/pr82788.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-probe-interval=10 --param stack-clash-protection-guard-size=12\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: /* { dg-skip-if \"RISC-V and AArch64 do not support this interval.\" { riscv*-*-* aarch64*-*-* } } */\n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-8.c\n2: /* { dg-options \"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-3.c\n2: /* { dg-options \"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\" } */\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\n4: \n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsui...
390-systemthinking_tokens-
391-systemthinking_tokens-
392-systemthinking_tokens-
393-systemthinking_tokens-
394-systemthinking_tokens-
395-systemthinking_tokens-
396-systemthinking_tokens-
397-systemthinking_tokens-
398-systemthinking_tokens-
399-systemthinking_tokens-
400-systemthinking_tokens-
401-assistanttool_usemcp__sourcegraph__sg_keyword_search
402-assistanttool_usemcp__sourcegraph__sg_keyword_search
4032026-06-12T16:20:30.919Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
4042026-06-12T16:20:30.980Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
405-systemthinking_tokens-
406-systemthinking_tokens-
407-systemthinking_tokens-
408-systemthinking_tokens-
409-systemthinking_tokens-
410-systemthinking_tokens-
411-systemthinking_tokens-
412-systemthinking_tokens-
413-systemthinking_tokens-
414-systemthinking_tokens-
415-systemthinking_tokens-
416-systemthinking_tokens-
417-systemthinking_tokens-
418-systemthinking_tokens-
419-systemthinking_tokens-
420-systemthinking_tokens-
421-systemthinking_tokens-
422-systemthinking_tokens-
423-assistanttool_usemcp__sourcegraph__sg_keyword_search
4242026-06-12T16:20:40.618Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16846: \n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\n3771: \n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\n3774: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\n2997: \n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n2999: \n3000: \n"}
425-systemthinking_tokens-
426-systemthinking_tokens-
427-systemthinking_tokens-
428-systemthinking_tokens-
429-systemthinking_tokens-
430-systemthinking_tokens-
431-systemthinking_tokens-
432-systemthinking_tokens-
433-systemthinking_tokens-
434-systemthinking_tokens-
435-systemthinking_tokens-
436-assistanttext-
Let me read the relevant sections of function.h for stack clash content.
437-assistanttool_usemcp__sourcegraph__sg_read_file
4382026-06-12T16:20:52.342Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/function.h%3FL635-655\n635:    to this function will have that bit clear.  */\n636: #define MINIMUM_METHOD_BOUNDARY \\\n637:   ((TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn)\t     \\\n638:    ? MAX (FUNCTION_BOUNDARY, 2 * BITS_PER_UNIT) : FUNCTION_BOUNDARY)\n639: \n640: enum stack_clash_probes {\n641:   NO_PROBE_NO_FRAME,\n642:   NO_PROBE_SMALL_FRAME,\n643:   PROBE_INLINE,\n644:   PROBE_LOOP\n645: };\n646: \n647: extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);\n648: \f\n649: \n650: extern void push_function_context (void);\n651: extern void pop_function_context (void);\n652: \n653: /* Save and restore status information for a nested function.  */\n654: extern void free_after_parsing (struct function *);\n655: extern void free_after_compilation (struct function *);\n656: "}
439-assistanttool_usemcp__sourcegraph__sg_read_file
4402026-06-12T16:20:52.846Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL1-50\n1: /* Target hook definitions.\n2:    Copyright (C) 2001-2026 Free Software Foundation, Inc.\n3: \n4:    This program is free software; you can redistribute it and/or modify it\n5:    under the terms of the GNU General Public License as published by the\n6:    Free Software Foundation; either version 3, or (at your option) any\n7:    later version.\n8: \n9:    This program is distributed in the hope that it will be useful,\n10:    but WITHOUT ANY WARRANTY; without even the implied warranty of\n11:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n12:    GNU General Public License for more details.\n13: \n14:    You should have received a copy of the GNU General Public License\n15:    along with this program; see the file COPYING3.  If not see\n16:    <http://www.gnu.org/licenses/>.\n17: \n18:    In other words, you are welcome to use, share and improve this program.\n19:    You are forbidden to forbid anyone else to use, share and improve\n20:    what you give them.   Help stamp out software-hoarding!  */\n21: \n22: /* See target-hooks-macros.h for details of macros that should be\n23:    provided by the including file, and how to use them here.  */\n24: #include \"target-hooks-macros.h\"\n25: \n26: #undef HOOK_TYPE\n27: #define HOOK_TYPE \"Target Hook\"\n28: \n29: HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)\n30: \n31: /* Functions that output assembler for the target.  */\n32: #define HOOK_PREFIX \"TARGET_ASM_\"\n33: HOOK_VECTOR (TARGET_ASM_OUT, asm_out)\n34: \n35: /* Opening and closing parentheses for asm expression grouping.  */\n36: DEFHOOKPOD\n37: (open_paren,\n38:  \"These target hooks are C string constants, describing the syntax in the\\n\\\n39: assembler for grouping arithmetic expressions.  If not overridden, they\\n\\\n40: default to normal parentheses, which is correct for most assemblers.\",\n41:  const char *, \"(\")\n42: DEFHOOKPODX (close_paren, const char *, \")\")\n43: \n44: /* Assembler instructions for creating various kinds of integer object.  */\n45: DEFHOOKPOD\n46: (byte_op,\n47:  \"@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP\\n\\\n48: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PSI_OP\\n\\\n49: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP\\n\\\n50: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PDI_OP\\n\\\n51: "}
441-systemthinking_tokens-
442-systemthinking_tokens-
443-systemthinking_tokens-
444-systemthinking_tokens-
445-systemthinking_tokens-
446-systemthinking_tokens-
447-systemthinking_tokens-
448-systemthinking_tokens-
449-systemthinking_tokens-
450-systemthinking_tokens-
451-systemthinking_tokens-
452-systemthinking_tokens-
453-systemthinking_tokens-
454-systemthinking_tokens-
455-systemthinking_tokens-
456-systemthinking_tokens-
457-systemthinking_tokens-
458-systemthinking_tokens-
459-systemthinking_tokens-
460-assistanttext-
Let me read different sections of i386.cc to find the stack probe implementation.
461-assistanttool_usemcp__sourcegraph__sg_read_file
4622026-06-12T16:21:06.740Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL100-200\n100: #include \"i386-features.h\"\n101: #include \"function-abi.h\"\n102: #include \"rtl-error.h\"\n103: #include \"gimple-pretty-print.h\"\n104: \n105: /* This file should be included last.  */\n106: #include \"target-def.h\"\n107: \n108: static void ix86_print_operand_address_as (FILE *, rtx, addr_space_t, bool);\n109: static void ix86_emit_restore_reg_using_pop (rtx, bool = false);\n110: \n111: \n112: #ifndef CHECK_STACK_LIMIT\n113: #define CHECK_STACK_LIMIT (-1)\n114: #endif\n115: \n116: /* Return index of given mode in mult and division cost tables.  */\n117: #define MODE_INDEX(mode)\t\t\t\t\t\\\n118:   ((mode) == QImode ? 0\t\t\t\t\t\t\\\n119:    : (mode) == HImode ? 1\t\t\t\t\t\\\n120:    : (mode) == SImode ? 2\t\t\t\t\t\\\n121:    : (mode) == DImode ? 3\t\t\t\t\t\\\n122:    : 4)\n123: \n124: \n125: /* Set by -mtune.  */\n126: const struct processor_costs *ix86_tune_cost = NULL;\n127: \n128: /* Set by -mtune or -Os.  */\n129: const struct processor_costs *ix86_cost = NULL;\n130: \n131: /* In case the average insn count for single function invocation is\n132:    lower than this constant, emit fast (but longer) prologue and\n133:    epilogue code.  */\n134: #define FAST_PROLOGUE_INSN_COUNT 20\n135: \n136: /* Names for 8 (low), 8 (high), and 16-bit registers, respectively.  */\n137: static const char *const qi_reg_name[] = QI_REGISTER_NAMES;\n138: static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES;\n139: static const char *const hi_reg_name[] = HI_REGISTER_NAMES;\n140: \n141: /* Array of the smallest class containing reg number REGNO, indexed by\n142:    REGNO.  Used by REGNO_REG_CLASS in i386.h.  */\n143: \n144: enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER] =\n145: {\n146:   /* ax, dx, cx, bx */\n147:   AREG, DREG, CREG, BREG,\n148:   /* si, di, bp, sp */\n149:   SIREG, DIREG, NON_Q_REGS, NON_Q_REGS,\n150:   /* FP registers */\n151:   FP_TOP_REG, FP_SECOND_REG, FLOAT_REGS, FLOAT_REGS,\n152:   FLOAT_REGS, FLOAT_REGS, FLOAT_REGS, FLOAT_REGS,\n153:   /* arg pointer, flags, fpsr, frame */\n154:   NON_Q_REGS, NO_REGS, NO_REGS, NON_Q_REGS,\n155:   /* SSE registers */\n156:   SSE_FIRST_REG, SSE_REGS, SSE_REGS, SSE_REGS,\n157:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\n158:   /* MMX registers */\n159:   MMX_REGS, MMX_REGS, MMX_REGS, MMX_REGS,\n160:   MMX_REGS, MMX_REGS, MMX_REGS, MMX_REGS,\n161:   /* REX registers */\n162:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n163:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n164:   /* SSE REX registers */\n165:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\n166:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\n167:   /* AVX-512 SSE registers */\n168:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\n169:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\n170:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\n171:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\n172:   /* Mask registers.  */\n173:   ALL_MASK_REGS, MASK_REGS, MASK_REGS, MASK_REGS,\n174:   MASK_REGS, MASK_REGS, MASK_REGS, MASK_REGS,\n175:   /* REX2 registers */\n176:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n177:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n178:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n179:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\n180: };\n181: \n182: /* The \"default\" register map used in 32bit mode.  */\n183: \n184: unsigned int const debugger_register_map[FIRST_PSEUDO_REGISTER] =\n185: {\n186:   /* general regs */\n187:   0, 2, 1, 3, 6, 7, 4, 5,\n188:   /* fp regs */\n189:   12, 13, 14, 15, 16, 17, 18, 19,\n190:   /* arg, flags, fpsr, frame */\n191:   IGNORED_DWARF_REGNUM, IGNORED_DWARF_REGNUM,\n192:   IGNORED_DWARF_REGNUM, IGNORED_DWARF_REGNUM,\n193:   /* SSE */\n194:   21, 22, 23, 24, 25, 26, 27, ...
463-systemthinking_tokens-
464-systemthinking_tokens-
465-systemthinking_tokens-
466-systemthinking_tokens-
467-systemthinking_tokens-
468-systemthinking_tokens-
469-systemthinking_tokens-
470-systemthinking_tokens-
471-systemthinking_tokens-
472-systemthinking_tokens-
473-systemthinking_tokens-
474-systemthinking_tokens-
475-systemthinking_tokens-
476-assistanttool_usemcp__sourcegraph__sg_read_file
4772026-06-12T16:21:15.364Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386-expand.cc%3FL1-80\n1: /* Copyright (C) 1988-2026 Free Software Foundation, Inc.\n2: \n3: This file is part of GCC.\n4: \n5: GCC is free software; you can redistribute it and/or modify\n6: it under the terms of the GNU General Public License as published by\n7: the Free Software Foundation; either version 3, or (at your option)\n8: any later version.\n9: \n10: GCC is distributed in the hope that it will be useful,\n11: but WITHOUT ANY WARRANTY; without even the implied warranty of\n12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n13: GNU General Public License for more details.\n14: \n15: You should have received a copy of the GNU General Public License\n16: along with GCC; see the file COPYING3.  If not see\n17: <http://www.gnu.org/licenses/>.  */\n18: \n19: #define IN_TARGET_CODE 1\n20: \n21: #include \"config.h\"\n22: #include \"system.h\"\n23: #include \"coretypes.h\"\n24: #include \"backend.h\"\n25: #include \"rtl.h\"\n26: #include \"tree.h\"\n27: #include \"memmodel.h\"\n28: #include \"gimple.h\"\n29: #include \"cfghooks.h\"\n30: #include \"cfgloop.h\"\n31: #include \"df.h\"\n32: #include \"tm_p.h\"\n33: #include \"stringpool.h\"\n34: #include \"expmed.h\"\n35: #include \"optabs.h\"\n36: #include \"regs.h\"\n37: #include \"emit-rtl.h\"\n38: #include \"recog.h\"\n39: #include \"cgraph.h\"\n40: #include \"diagnostic.h\"\n41: #include \"cfgbuild.h\"\n42: #include \"alias.h\"\n43: #include \"fold-const.h\"\n44: #include \"attribs.h\"\n45: #include \"calls.h\"\n46: #include \"stor-layout.h\"\n47: #include \"varasm.h\"\n48: #include \"output.h\"\n49: #include \"insn-attr.h\"\n50: #include \"flags.h\"\n51: #include \"except.h\"\n52: #include \"explow.h\"\n53: #include \"expr.h\"\n54: #include \"cfgrtl.h\"\n55: #include \"common/common-target.h\"\n56: #include \"langhooks.h\"\n57: #include \"reload.h\"\n58: #include \"gimplify.h\"\n59: #include \"dwarf2.h\"\n60: #include \"tm-constrs.h\"\n61: #include \"cselib.h\"\n62: #include \"sched-int.h\"\n63: #include \"opts.h\"\n64: #include \"tree-pass.h\"\n65: #include \"context.h\"\n66: #include \"pass_manager.h\"\n67: #include \"target-globals.h\"\n68: #include \"gimple-iterator.h\"\n69: #include \"shrink-wrap.h\"\n70: #include \"builtins.h\"\n71: #include \"rtl-iter.h\"\n72: #include \"tree-iterator.h\"\n73: #include \"dbgcnt.h\"\n74: #include \"case-cfn-macros.h\"\n75: #include \"dojump.h\"\n76: #include \"fold-const-call.h\"\n77: #include \"tree-vrp.h\"\n78: #include \"tree-ssanames.h\"\n79: #include \"selftest.h\"\n80: #include \"selftest-rtl.h\"\n81: "}
478-systemthinking_tokens-
479-systemthinking_tokens-
480-systemthinking_tokens-
481-systemthinking_tokens-
482-systemthinking_tokens-
483-systemthinking_tokens-
484-systemthinking_tokens-
485-systemthinking_tokens-
486-systemthinking_tokens-
487-systemthinking_tokens-
488-systemthinking_tokens-
489-systemthinking_tokens-
490-systemthinking_tokens-
491-systemthinking_tokens-
492-systemthinking_tokens-
493-systemthinking_tokens-
494-systemthinking_tokens-
495-systemthinking_tokens-
496-systemthinking_tokens-
497-systemthinking_tokens-
498-systemthinking_tokens-
499-systemthinking_tokens-
500-systemthinking_tokens-
501-systemthinking_tokens-
502-systemthinking_tokens-
503-systemthinking_tokens-
504-systemthinking_tokens-
505-systemthinking_tokens-
506-assistanttext-
Let me check a few more potential locations for `TARGET_STACK_CLASH_PROTECTION`.
507-assistanttool_usemcp__sourcegraph__sg_keyword_search
5082026-06-12T16:21:40.946Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"No results.\n\nNo results found."}
509-assistanttool_usemcp__sourcegraph__sg_keyword_search
5102026-06-12T16:21:41.490Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/params.opt\n1108: -param=stack-clash-protection-guard-size=\n1109: Common Joined UInteger Var(param_stack_clash_protection_guard_size) Init(12) IntegerRange(12, 30) Param Optimization\n1110: Size of the stack guard expressed as a power of two in bytes.\n1111: \n1112: -param=stack-clash-protection-probe-interval=\n1113: Common Joined UInteger Var(param_stack_clash_protection_probe_interval) Init(12) IntegerRange(10, 16) Param Optimization\n1114: Interval in which to probe the stack expressed as a power of two in bytes.\n1115: \n"}
511-systemthinking_tokens-
512-systemthinking_tokens-
513-systemthinking_tokens-
514-systemthinking_tokens-
515-systemthinking_tokens-
516-systemthinking_tokens-
517-systemthinking_tokens-
518-systemthinking_tokens-
519-systemthinking_tokens-
520-systemthinking_tokens-
521-systemthinking_tokens-
522-systemthinking_tokens-
523-systemthinking_tokens-
524-systemthinking_tokens-
525-systemthinking_tokens-
526-systemthinking_tokens-
527-systemthinking_tokens-
528-systemthinking_tokens-
529-systemthinking_tokens-
530-systemthinking_tokens-
531-systemthinking_tokens-
532-systemthinking_tokens-
533-systemthinking_tokens-
534-systemthinking_tokens-
535-systemthinking_tokens-
536-systemthinking_tokens-
537-systemthinking_tokens-
538-systemthinking_tokens-
539-systemthinking_tokens-
540-systemthinking_tokens-
541-systemthinking_tokens-
542-assistanttext-
Let me look for all stack-clash test files and verify the explow.cc function list.
543-assistanttool_usemcp__sourcegraph__sg_keyword_search
544-assistanttool_usemcp__sourcegraph__sg_read_file
5452026-06-12T16:21:59.464Zusertool_resultmcp__sourcegraph__sg_read_file
{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.cc%3FL1920-2000\n1920: \n1921: \t  if (CONST_INT_P (temp))\n1922: \t    {\n1923: \t      /* Use [base + disp} addressing mode if supported.  */\n1924: \t      HOST_WIDE_INT offset = INTVAL (temp);\n1925: \t      addr = memory_address (Pmode,\n1926: \t\t\t\t     plus_constant (Pmode, last_addr,\n1927: \t\t\t\t\t\t    STACK_GROW_OFF (offset)));\n1928: \t    }\n1929: \t  else\n1930: \t    {\n1931: \t      /* Manual CSE if the difference is not known at compile-time.  */\n1932: \t      temp = gen_rtx_MINUS (Pmode, size, rounded_size_op);\n1933: \t      addr = memory_address (Pmode,\n1934: \t\t\t\t     gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,\n1935: \t\t\t\t\t\t     last_addr, temp));\n1936: \t    }\n1937: \n1938: \t  emit_stack_probe (addr);\n1939: \t}\n1940:     }\n1941: \n1942:   /* Make sure nothing is scheduled before we are done.  */\n1943:   emit_insn (gen_blockage ());\n1944: }\n1945: \n1946: /* Compute parameters for stack clash probing a dynamic stack\n1947:    allocation of SIZE bytes.\n1948: \n1949:    We compute ROUNDED_SIZE, LAST_ADDR, RESIDUAL and PROBE_INTERVAL.\n1950: \n1951:    Additionally we conditionally dump the type of probing that will\n1952:    be needed given the values computed.  */\n1953: \n1954: void\n1955: compute_stack_clash_protection_loop_data (rtx *rounded_size, rtx *last_addr,\n1956: \t\t\t\t\t  rtx *residual,\n1957: \t\t\t\t\t  HOST_WIDE_INT *probe_interval,\n1958: \t\t\t\t\t  rtx size)\n1959: {\n1960:   /* Round SIZE down to STACK_CLASH_PROTECTION_PROBE_INTERVAL */\n1961:   *probe_interval\n1962:     = 1 << param_stack_clash_protection_probe_interval;\n1963:   *rounded_size = simplify_gen_binary (AND, Pmode, size,\n1964: \t\t\t\t        GEN_INT (-*probe_interval));\n1965: \n1966:   /* Compute the value of the stack pointer for the last iteration.\n1967:      It's just SP + ROUNDED_SIZE.  */\n1968:   rtx rounded_size_op = force_operand (*rounded_size, NULL_RTX);\n1969:   *last_addr = force_operand (gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,\n1970: \t\t\t\t\t      stack_pointer_rtx,\n1971: \t\t\t\t\t      rounded_size_op),\n1972: \t\t\t      NULL_RTX);\n1973: \n1974:   /* Compute any residuals not allocated by the loop above.  Residuals\n1975:      are just the ROUNDED_SIZE - SIZE.  */\n1976:   *residual = simplify_gen_binary (MINUS, Pmode, size, *rounded_size);\n1977: \n1978:   /* Dump key information to make writing tests easy.  */\n1979:   if (dump_file)\n1980:     {\n1981:       if (*rounded_size == CONST0_RTX (Pmode))\n1982: \tfprintf (dump_file,\n1983: \t\t \"Stack clash skipped dynamic allocation and probing loop.\\n\");\n1984:       else if (CONST_INT_P (*rounded_size)\n1985: \t       && INTVAL (*rounded_size) <= 4 * *probe_interval)\n1986: \tfprintf (dump_file,\n1987: \t\t \"Stack clash dynamic allocation and probing inline.\\n\");\n1988:       else if (CONST_INT_P (*rounded_size))\n1989: \tfprintf (dump_file,\n1990: \t\t \"Stack clash dynamic allocation and probing in \"\n1991: \t\t \"rotated loop.\\n\");\n1992:       else\n1993: \tfprintf (dump_file,\n1994: \t\t \"Stack clash dynamic allocation and probing in loop.\\n\");\n1995: \n1996:       if (*residual != CONST0_RTX (Pmode))\n1997: \tfprintf (dump_file,\n1998: \t\t \"Stack clash dynamic allocation and probing residuals.\\n\");\n1999:       else\n2000: \tfprintf (dump_file,\n2001: "}
5462026-06-12T16:21:59.531Zusertool_resultmcp__sourcegraph__sg_keyword_search
{"text":"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n"}
547-systemthinking_tokens-
548-systemthinking_tokens-
549-systemthinking_tokens-
550-systemthinking_tokens-
551-systemthinking_tokens-
552-systemthinking_tokens-
553-systemthinking_tokens-
554-systemthinking_tokens-
555-systemthinking_tokens-
556-systemthinking_tokens-
557-systemthinking_tokens-
558-systemthinking_tokens-
559-systemthinking_tokens-
560-systemthinking_tokens-
561-systemthinking_tokens-
562-systemthinking_tokens-
563-systemthinking_tokens-
564-systemthinking_tokens-
565-systemthinking_tokens-
566-systemthinking_tokens-
567-assistanttext-
I have gathered enough information. Now let me write the answer.json.
568-assistanttool_useWrite
5692026-06-12T16:22:33.391Zusertool_resultWrite
File created successfully at: /workspace/answer.json (file state is current in your context — no need to Read it back)
570-assistanttext-
The audit is complete. Here's a summary of findings:

## GCC Stack Clash Protection Audit

| # | File | Key Symbol |
|---|------|-----------|
| 1 | `gcc/config/i386/i386.cc` | `output_adjust_stack_and_probe`, `output_probe_stack_range` |
| 2 | `gcc/explow.cc` | `anti_adjust_stack_and_probe` (line 2200), `anti_adjust_stack_and_probe_stack_clash` (line 2072), `compute_stack_clash_protection_loop_data` (line 1954) |
| 3 | `gcc/target.def` | `DEFHOOK(stack_clash_protection_alloca_probe_range, ...)` → `TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE` |
| 3b | `gcc/explow.h` | Stack clash function declarations |
| 3c | `gcc/targhooks.h` | `default_stack_clash_protection_alloca_probe_range` |
| 4 | `gcc/testsuite/gcc.target/i386/stack-clash-protection.c` | compile test with `-fstack-clash-protection` |
| 5 | `gcc/common.opt` (line 3054) | `fstack-clash-protection` → `flag_stack_clash_protection` |

**Key design notes:**
- The `-fstack-clash-protection` flag is processed via `flag_stack_clash_protection` from `common.opt`
- The generic implementation in `explow.cc` handles all architectures; targets can customize via the `TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE` hook
- For x86, `output_adjust_stack_and_probe` in `i386.cc` generates the actual probe-and-decrement loop assembly
- `function.h`'s `stack_clash_probes` enum tracks whether frame probing is inline, loop-based, or not needed
Tool Calls (76)
1. ToolSearch @ -

Input

{
  "query": "select:mcp__sourcegraph__sg_keyword_search,mcp__sourcegraph__sg_read_file,mcp__sourcegraph__sg_list_files",
  "max_results": 5
}

Output

{
  "matches": [
    "mcp__sourcegraph__sg_keyword_search",
    "mcp__sourcegraph__sg_read_file",
    "mcp__sourcegraph__sg_list_files"
  ],
  "query": "select:mcp__sourcegraph__sg_keyword_search,mcp__sourcegraph__sg_read_file,mcp__sourcegraph__sg_list_files",
  "total_deferred_tools": 33
}
2. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack_clash_protection file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
3. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ anti_adjust_stack_and_probe file:explow.cc"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\\n2200: void\\n2201: anti_adjust_stack_and_probe (rtx size, bool adjust_back)\\n2202: {\\n2203: \\n2071: void\\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\\n2073: {\\n2074: \\n1643:       if (flag_stack_check && STACK_CHECK_MOVING_SP)\\n1644: \\tanti_adjust_stack_and_probe (size, false);\\n1645:       else if (flag_stack_clash_protection)\\n1646: \\tanti_adjust_stack_and_probe_stack_clash (size);\\n1647:       else\\n1648: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\n2200: void\n2201: anti_adjust_stack_and_probe (rtx size, bool adjust_back)\n2202: {\n2203: \n2071: void\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\n2073: {\n2074: \n1643:       if (flag_stack_check && STACK_CHECK_MOVING_SP)\n1644: \tanti_adjust_stack_and_probe (size, false);\n1645:       else if (flag_stack_clash_protection)\n1646: \tanti_adjust_stack_and_probe_stack_clash (size);\n1647:       else\n1648: \n"
  }
}
4. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\\n16846: \\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\\\\n16849:   riscv_stack_clash_protection_alloca_probe_range\\n16850: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\\n2744: /* Default implementation for\\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\\n2746: HOST_WIDE_INT\\n2747: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\\n3771: \\n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\\n3774: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\\n2997: \\n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n2999: \\n3000: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16846: \n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\n3771: \n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\n3774: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\n2997: \n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n2999: \n3000: \n"
  }
}
5. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack-clash file:testsuite/gcc.target/i386"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr109780-3.c\\n1: /* { dg-do run  { target avx2_runtime } }  */\\n2: /* { dg-options \\\"-O2 -mavx2 -mtune=znver1 -fno-stack-protector -fno-stack-clash-protection\\\" } */\\n3: \\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection\\\" } */\\n3: \\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84128.c\\n1: /* { dg-do run } */\\n2: /* { dg-options \\\"-O2 -march=i686 -mtune=generic -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target ia32 } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr83994.c\\n2: /* { dg-require-effective-target fpic } */\\n3: /* { dg-options \\\"-O2 -march=i686 -fpic -fstack-clash-protection\\\" } */\\n4: /* { dg-require-effective-target ia32 } */\\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84064.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -march=i686 -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target ia32 } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-17.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer -mnoreturn-no-callee-saved-registers\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-11.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection -mtune=generic -fno-stack-protector\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-12.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-18.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-check-19.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr109780-3.c\n1: /* { dg-do run  { target avx2_runtime } }  */\n2: /* { dg-options \"-O2 -mavx2 -mtune=znver1 -fno-stack-protector -fno-stack-clash-protection\" } */\n3: \n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84128.c\n1: /* { dg-do run } */\n2: /* { dg-options \"-O2 -march=i686 -mtune=generic -fstack-clash-protection\" } */\n3: /* { dg-require-effective-target ia32 } */\n4: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr83994.c\n2: /* { dg-require-effective-target fpic } */\n3: /* { dg-options \"-O2 -march=i686 -fpic -fstack-clash-protection\" } */\n4: /* { dg-require-effective-target ia32 } */\n5: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/pr84064.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -march=i686 -fstack-clash-protection\" } */\n3: /* { dg-require-effective-ta
...
6. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ fstack-clash-protection file:common.opt"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt\\n3053: \\n3054: fstack-clash-protection\\n3055: Common Var(flag_stack_clash_protection) Optimization\\n3056: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt.urls\\n1453: \\n1454: fstack-clash-protection\\n1455: UrlSuffix(gcc/Instrumentation-Options.html#index-fno-stack-clash-protection)\\n1456: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt\n3053: \n3054: fstack-clash-protection\n3055: Common Var(flag_stack_clash_protection) Optimization\n3056: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/common.opt.urls\n1453: \n1454: fstack-clash-protection\n1455: UrlSuffix(gcc/Instrumentation-Options.html#index-fno-stack-clash-protection)\n1456: \n"
  }
}
7. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack_clash file:config/i386/i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
8. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION file:target.def"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
9. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack-clash-protection file:testsuite/gcc.target/i386/stack-clash"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection\\\" } */\\n3: \\n4: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: \n"
  }
}
10. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ ix86_adjust_stack_and_probe file:i386"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
11. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION file:.h"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\\n2744: /* Default implementation for\\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\\n2746: HOST_WIDE_INT\\n2747: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n"
  }
}
12. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE file:targhooks.h"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.h\\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\\n306: extern void default_select_early_remat_modes (sbitmap);\\n307: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.h\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\n306: extern void default_select_early_remat_modes (sbitmap);\n307: \n"
  }
}
13. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ probe_stack_clash file:i386"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
14. mcp__sourcegraph__sg_list_files @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386"
}

Output

{
  "content": "{\"text\":\"gcc/config/i386/adxintrin.h\\ngcc/config/i386/ammintrin.h\\ngcc/config/i386/amxavx512intrin.h\\ngcc/config/i386/amxbf16intrin.h\\ngcc/config/i386/amxcomplexintrin.h\\ngcc/config/i386/amxfp16intrin.h\\ngcc/config/i386/amxfp8intrin.h\\ngcc/config/i386/amxint8intrin.h\\ngcc/config/i386/amxmovrsintrin.h\\ngcc/config/i386/amxtf32intrin.h\\ngcc/config/i386/amxtileintrin.h\\ngcc/config/i386/amxtransposeintrin.h\\ngcc/config/i386/athlon.md\\ngcc/config/i386/atom.md\\ngcc/config/i386/att.h\\ngcc/config/i386/avx10_2bf16intrin.h\\ngcc/config/i386/avx10_2convertintrin.h\\ngcc/config/i386/avx10_2copyintrin.h\\ngcc/config/i386/avx10_2mediaintrin.h\\ngcc/config/i386/avx10_2minmaxintrin.h\\ngcc/config/i386/avx10_2satcvtintrin.h\\ngcc/config/i386/avx2intrin.h\\ngcc/config/i386/avx5124fmapsintrin.h\\ngcc/config/i386/avx5124vnniwintrin.h\\ngcc/config/i386/avx512bf16intrin.h\\ngcc/config/i386/avx512bf16vlintrin.h\\ngcc/config/i386/avx512bitalgintrin.h\\ngcc/config/i386/avx512bitalgvlintrin.h\\ngcc/config/i386/avx512bmmintrin.h\\ngcc/config/i386/avx512bmmvlintrin.h\\ngcc/config/i386/avx512bwintrin.h\\ngcc/config/i386/avx512cdintrin.h\\ngcc/config/i386/avx512dqintrin.h\\ngcc/config/i386/avx512erintrin.h\\ngcc/config/i386/avx512fintrin.h\\ngcc/config/i386/avx512fp16intrin.h\\ngcc/config/i386/avx512fp16vlintrin.h\\ngcc/config/i386/avx512ifmaintrin.h\\ngcc/config/i386/avx512ifmavlintrin.h\\ngcc/config/i386/avx512pfintrin.h\\ngcc/config/i386/avx512vbmi2intrin.h\\ngcc/config/i386/avx512vbmi2vlintrin.h\\ngcc/config/i386/avx512vbmiintrin.h\\ngcc/config/i386/avx512vbmivlintrin.h\\ngcc/config/i386/avx512vlbwintrin.h\\ngcc/config/i386/avx512vldqintrin.h\\ngcc/config/i386/avx512vlintrin.h\\ngcc/config/i386/avx512vnniintrin.h\\ngcc/config/i386/avx512vnnivlintrin.h\\ngcc/config/i386/avx512vp2intersectintrin.h\\ngcc/config/i386/avx512vp2intersectvlintrin.h\\ngcc/config/i386/avx512vpopcntdqintrin.h\\ngcc/config/i386/avx512vpopcntdqvlintrin.h\\ngcc/config/i386/avxifmaintrin.h\\ngcc/config/i386/avxintrin.h\\ngcc/config/i386/avxmath.h\\ngcc/config/i386/avxneconvertintrin.h\\ngcc/config/i386/avxvnniint16intrin.h\\ngcc/config/i386/avxvnniint8intrin.h\\ngcc/config/i386/avxvnniintrin.h\\ngcc/config/i386/bdver1.md\\ngcc/config/i386/bdver3.md\\ngcc/config/i386/biarch64.h\\ngcc/config/i386/biarchx32.h\\ngcc/config/i386/bmi2intrin.h\\ngcc/config/i386/bmiintrin.h\\ngcc/config/i386/bmmintrin.h\\ngcc/config/i386/bsd.h\\ngcc/config/i386/btver2.md\\ngcc/config/i386/cet.h\\ngcc/config/i386/cetintrin.h\\ngcc/config/i386/cldemoteintrin.h\\ngcc/config/i386/clflushoptintrin.h\\ngcc/config/i386/clwbintrin.h\\ngcc/config/i386/clzerointrin.h\\ngcc/config/i386/cmpccxaddintrin.h\\ngcc/config/i386/constraints.md\\ngcc/config/i386/core2.md\\ngcc/config/i386/cpuid.h\\ngcc/config/i386/cross-stdarg.h\\ngcc/config/i386/crtdll.h\\ngcc/config/i386/cygming.h\\ngcc/config/i386/cygwin-stdint.h\\ngcc/config/i386/cygwin-w64.h\\ngcc/config/i386/cygwin.h\\ngcc/config/i386/cygwin.opt\\ngcc/config/i386/cygwin.opt.urls\\ngcc/config/i386/darwin.h\\ngcc/config/i386/darwin32-biarch.h\\ngcc/config/i386/darwin64-biarch.h\\ngcc/config/i386/djgpp-stdint.h\\ngcc/config/i386/djgpp.cc\\ngcc/config/i386/djgpp.h\\ngcc/config/i386/djgpp.opt\\ngcc/config/i386/djgpp.opt.urls\\ngcc/config/i386/dragonfly.h\\ngcc/config/i386/driver-i386.cc\\ngcc/config/i386/driver-mingw32.cc\\ngcc/config/i386/emmintrin.h\\ngcc/config/i386/enqcmdintrin.h\\ngcc/config/i386/f16cintrin.h\\ngcc/config/i386/fma4intrin.h\\ngcc/config/i386/fmaintrin.h\\ngcc/config/i386/freebsd.h\\ngcc/config/i386/freebsd64.h\\ngcc/config/i386/fxsrintrin.h\\ngcc/config/i386/gas.h\\ngcc/config/i386/gcc-auto-profile\\ngcc/config/i386/geode.md\\ngcc/config/i386/gfniintrin.h\\ngcc/config/i386/glm.md\\ngcc/config/i386/gmm_malloc.h\\ngcc/config/i386/gnu-property.cc\\ngcc/config/i386/gnu-user-common.h\\ngcc/config/i386/gnu-user.h\\ngcc/config/i386/gnu-user64.h\\ngcc/config/i386/gnu.h\\ngcc/config/i386/gnu64.h\\ngcc/config/i386/haswell.md\\ngcc/c
...
15. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack_clash file:config/i386"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
16. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack_clash file:i386-expand.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
17. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ STACK_CLASH_PROTECTION file:target.def"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/target.def\\n6534: DEFHOOK\\n6535: (stack_clash_protection_alloca_probe_range,\\n6536:  \\\"Some targets have an ABI defined interval for which no probing needs to be done.\\\\n\\\\\\n6537: \\n6544:  HOST_WIDE_INT, (void),\\n6545:  default_stack_clash_protection_alloca_probe_range)\\n6546: \\n6547: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/target.def\n6534: DEFHOOK\n6535: (stack_clash_protection_alloca_probe_range,\n6536:  \"Some targets have an ABI defined interval for which no probing needs to be done.\\n\\\n6537: \n6544:  HOST_WIDE_INT, (void),\n6545:  default_stack_clash_protection_alloca_probe_range)\n6546: \n6547: \n"
  }
}
18. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ flag_stack_clash file:i386"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
19. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ STACK_CLASH_PROTECTION file:i386.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
20. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ ix86_expand_prologue file:config/i386"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n21106:   \\\"\\\"\\n21107:   \\\"ix86_expand_prologue (); DONE;\\\")\\n21108: \\n21109: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\\n34: extern void ix86_expand_prologue (void);\\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\\n36: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n21106:   \"\"\n21107:   \"ix86_expand_prologue (); DONE;\")\n21108: \n21109: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n"
  }
}
21. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack clash\" file:config/i386"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
22. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"ix86_expand_prologue\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
23. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"ix86_expand_prologue\" file:i386-expand.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
24. mcp__sourcegraph__sg_nls_search @ -

Input

{
  "query": "stack clash protection probing i386 x86_64 expand prologue"
}

Output

{
  "content": "{\"text\":\"# github.com/microsoft/vscode – src/vs/workbench/contrib/testing/common/testTypes.ts\\n428: \\n429: export const enum TestItemExpandState {\\n430: \\tNotExpandable,\\n431: \\tExpandable,\\n432: \\tBusyExpanding,\\n433: \\tExpanded,\\n434: }\\n435: \\n454: \\texport const serialize = (item: Readonly<InternalTestItem>): Serialized => ({\\n455: \\t\\texpand: item.expand,\\n456: \\t\\titem: ITestItem.serialize(item.item)\\n457: \\n463: \\t\\tcontrollerId: TestId.root(serialized.item.extId),\\n464: \\t\\texpand: serialized.expand,\\n465: \\t\\titem: ITestItem.deserialize(uriIdentity, serialized.item)\\n466: \\n\\n# github.com/kubernetes/kubernetes – cmd/kube-controller-manager/app/core.go\\n320: \\n321: func newPersistentVolumeExpanderControllerDescriptor() *ControllerDescriptor {\\n322: \\treturn &ControllerDescriptor{\\n323: \\t\\tname:        names.PersistentVolumeExpanderController,\\n324: \\t\\taliases:     []string{\\\"persistentvolume-expander\\\"},\\n325: \\t\\tconstructor: newPersistentVolumeExpanderController,\\n326: \\t}\\n327: \\n737: \\n738: func newPersistentVolumeProtectionControllerDescriptor() *ControllerDescriptor {\\n739: \\treturn &ControllerDescriptor{\\n740: \\t\\tname:        names.PersistentVolumeProtectionController,\\n741: \\t\\taliases:     []string{\\\"pv-protection\\\"},\\n742: \\t\\tconstructor: newPersistentVolumeProtectionController,\\n743: \\t}\\n744: \\n708: \\n709: func newPersistentVolumeClaimProtectionControllerDescriptor() *ControllerDescriptor {\\n710: \\treturn &ControllerDescriptor{\\n711: \\t\\tname:        names.PersistentVolumeClaimProtectionController,\\n712: \\t\\taliases:     []string{\\\"pvc-protection\\\"},\\n713: \\t\\tconstructor: newPersistentVolumeClaimProtectionController,\\n714: \\t}\\n715: \\n\\n# github.com/pytorch/pytorch – torch/fx/graph.py\\n332: \\n333: # get File:lineno code from stack_trace\\n334: def _parse_stack_trace(\\n335:     stack_trace: str, filter_fn: Callable[[str, str, str], bool] | None = None\\n336: ) -> _ParsedStackTrace | None:\\n337:     if stack_trace is None:\\n338:         return None\\n339: \\n318: @dataclass(frozen=True)\\n319: class _ParsedStackTrace:\\n320:     \\\"\\\"\\\"\\n321:     Represents the top-most frame of a parsed stack trace\\n322:     \\\"\\\"\\\"\\n323: \\n247:     # Optional mapping from the forward function's line number to\\n248:     # node index. Line number starts at the prologue (i.e. forward()).\\n249:     _lineno_map: dict[int, int | None] | None\\n250:     # The line number of prologue in fn_code\\n251:     _prologue_start: int = 0\\n252: \\n253: \\n\\n# github.com/microsoft/vscode – src/vs/workbench/contrib/debug/browser/variablesView.ts\\n336: \\n337: function isStackFrame(obj: any): obj is IStackFrame {\\n338: \\treturn obj instanceof StackFrame;\\n339: }\\n340: \\n67: \\tprivate needsRefresh = false;\\n68: \\tprivate tree!: WorkbenchAsyncDataTree<IStackFrame | null, IExpression | IScope, FuzzyScore>;\\n69: \\tprivate savedViewState = new Map<string, IAsyncDataTreeViewState>();\\n70: \\tprivate autoExpandedScopes = new Set<string>();\\n71: \\n72: \\n353: \\n354: \\tprotected override doGetChildren(element: IStackFrame | IExpression | IScope): Promise<(IExpression | IScope)[]> {\\n355: \\t\\tif (isStackFrame(element)) {\\n356: \\t\\t\\treturn element.getScopes();\\n357: \\n\\n# github.com/microsoft/vscode – src/vs/workbench/contrib/debug/browser/callStackView.ts\\n139: \\n140: async function expandTo(session: IDebugSession, tree: WorkbenchCompressibleAsyncDataTree<IDebugModel, CallStackItem, FuzzyScore>): Promise<void> {\\n141: \\tif (session.parentSession) {\\n142: \\t\\tawait expandTo(session.parentSession, tree);\\n143: \\t}\\n144: \\tawait tree.expand(session);\\n145: }\\n146: \\n514: \\n515: interface IStackFrameTemplateData {\\n516: \\tstackFrame: HTMLElement;\\n517: \\tfile: HTMLElement;\\n518: \\n56: \\n57: type CallStackItem = IStackFrame | IThread | IDebugSession | string | ThreadAndS
...
25. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"ix86_adjust_stack_and_probe\" OR \"ix86_emit_probe_stack_range\""
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
26. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash\" file:explow.cc"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\\n2071: void\\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\\n2073: {\\n2074: \\n2013: void\\n2014: emit_stack_clash_protection_probe_loop_start (rtx *loop_lab,\\n2015: \\t\\t\\t\\t\\t      rtx *end_lab,\\n2016: \\n2035: void\\n2036: emit_stack_clash_protection_probe_loop_end (rtx loop_lab, rtx end_loop,\\n2037: \\t\\t\\t\\t\\t    rtx last_addr, bool rotated)\\n2038: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/explow.cc\n2071: void\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\n2073: {\n2074: \n2013: void\n2014: emit_stack_clash_protection_probe_loop_start (rtx *loop_lab,\n2015: \t\t\t\t\t      rtx *end_lab,\n2016: \n2035: void\n2036: emit_stack_clash_protection_probe_loop_end (rtx loop_lab, rtx end_loop,\n2037: \t\t\t\t\t    rtx last_addr, bool rotated)\n2038: \n"
  }
}
27. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/explow.cc",
  "startLine": 2000,
  "endLine": 2220
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.cc%3FL2000-2220\\n2000: \\tfprintf (dump_file,\\n2001: \\t\\t \\\"Stack clash skipped dynamic allocation and \\\"\\n2002: \\t\\t \\\"probing residuals.\\\\n\\\");\\n2003:     }\\n2004: }\\n2005: \\n2006: /* Emit the start of an allocate/probe loop for stack\\n2007:    clash protection.\\n2008: \\n2009:    LOOP_LAB and END_LAB are returned for use when we emit the\\n2010:    end of the loop.\\n2011: \\n2012:    LAST addr is the value for SP which stops the loop.  */\\n2013: void\\n2014: emit_stack_clash_protection_probe_loop_start (rtx *loop_lab,\\n2015: \\t\\t\\t\\t\\t      rtx *end_lab,\\n2016: \\t\\t\\t\\t\\t      rtx last_addr,\\n2017: \\t\\t\\t\\t\\t      bool rotated)\\n2018: {\\n2019:   /* Essentially we want to emit any setup code, the top of loop\\n2020:      label and the comparison at the top of the loop.  */\\n2021:   *loop_lab = gen_label_rtx ();\\n2022:   *end_lab = gen_label_rtx ();\\n2023: \\n2024:   emit_label (*loop_lab);\\n2025:   if (!rotated)\\n2026:     emit_cmp_and_jump_insns (stack_pointer_rtx, last_addr, EQ, NULL_RTX,\\n2027: \\t\\t\\t     Pmode, 1, *end_lab);\\n2028: }\\n2029: \\n2030: /* Emit the end of a stack clash probing loop.\\n2031: \\n2032:    This consists of just the jump back to LOOP_LAB and\\n2033:    emitting END_LOOP after the loop.  */\\n2034: \\n2035: void\\n2036: emit_stack_clash_protection_probe_loop_end (rtx loop_lab, rtx end_loop,\\n2037: \\t\\t\\t\\t\\t    rtx last_addr, bool rotated)\\n2038: {\\n2039:   if (rotated)\\n2040:     emit_cmp_and_jump_insns (stack_pointer_rtx, last_addr, NE, NULL_RTX,\\n2041: \\t\\t\\t     Pmode, 1, loop_lab);\\n2042:   else\\n2043:     emit_jump (loop_lab);\\n2044: \\n2045:   emit_label (end_loop);\\n2046: \\n2047: }\\n2048: \\n2049: /* Adjust the stack pointer by minus SIZE (an rtx for a number of bytes)\\n2050:    while probing it.  This pushes when SIZE is positive.  SIZE need not\\n2051:    be constant.\\n2052: \\n2053:    This is subtly different than anti_adjust_stack_and_probe to try and\\n2054:    prevent stack-clash attacks\\n2055: \\n2056:      1. It must assume no knowledge of the probing state, any allocation\\n2057: \\tmust probe.\\n2058: \\n2059: \\tConsider the case of a 1 byte alloca in a loop.  If the sum of the\\n2060: \\tallocations is large, then this could be used to jump the guard if\\n2061: \\tprobes were not emitted.\\n2062: \\n2063:      2. It never skips probes, whereas anti_adjust_stack_and_probe will\\n2064: \\tskip the probe on the first PROBE_INTERVAL on the assumption it\\n2065: \\twas already done in the prologue and in previous allocations.\\n2066: \\n2067:      3. It only allocates and probes SIZE bytes, it does not need to\\n2068: \\tallocate/probe beyond that because this probing style does not\\n2069: \\tguarantee signal handling capability if the guard is hit.  */\\n2070: \\n2071: void\\n2072: anti_adjust_stack_and_probe_stack_clash (rtx size)\\n2073: {\\n2074:   /* First ensure SIZE is Pmode.  */\\n2075:   if (GET_MODE (size) != VOIDmode && GET_MODE (size) != Pmode)\\n2076:     size = convert_to_mode (Pmode, size, 1);\\n2077: \\n2078:   /* We can get here with a constant size on some targets.  */\\n2079:   rtx rounded_size, last_addr, residual;\\n2080:   HOST_WIDE_INT probe_interval, probe_range;\\n2081:   bool target_probe_range_p = false;\\n2082:   compute_stack_clash_protection_loop_data (&rounded_size, &last_addr,\\n2083: \\t\\t\\t\\t\\t    &residual, &probe_interval, size);\\n2084: \\n2085:   /* Get the back-end specific probe ranges.  */\\n2086:   probe_range = targetm.stack_clash_protection_alloca_probe_range ();\\n2087:   target_probe_range_p = probe_range != 0;\\n2088:   gcc_assert (probe_range >= 0);\\n2089: \\n2090:   /* If no back-end specific range defined, default to the top of the newly\\n2091:      allocated range.  */\\n2092:   if (probe_range =
...
28. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/common.opt",
  "startLine": 3050,
  "endLine": 3060
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/common.opt%3FL3050-3060\\n3050: fstack-check\\n3051: Common Alias(fstack-check=, specific, no)\\n3052: Insert stack checking code into the program.  Same as -fstack-check=specific.\\n3053: \\n3054: fstack-clash-protection\\n3055: Common Var(flag_stack_clash_protection) Optimization\\n3056: Insert code to probe each page of stack space as it is allocated to protect\\n3057: from stack-clash style attacks.\\n3058: \\n3059: ; The real option is fno-stack-limit.\\n3060: fstack-limit\\n3061: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/common.opt%3FL3050-3060\n3050: fstack-check\n3051: Common Alias(fstack-check=, specific, no)\n3052: Insert stack checking code into the program.  Same as -fstack-check=specific.\n3053: \n3054: fstack-clash-protection\n3055: Common Var(flag_stack_clash_protection) Optimization\n3056: Insert code to probe each page of stack space as it is allocated to protect\n3057: from stack-clash style attacks.\n3058: \n3059: ; The real option is fno-stack-limit.\n3060: fstack-limit\n3061: "
  }
}
29. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/testsuite/gcc.target/i386/stack-clash-protection.c"
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/testsuite/gcc.target/i386/stack-clash-protection.c\\n1: /* { dg-do compile } */\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection\\\" } */\\n3: \\n4: int flag;\\n5: void open();\\n6: int getChar();\\n7: typedef enum { QUOTE } CharType;\\n8: typedef enum { UNQ } State;\\n9: CharType getCharType();\\n10: void expand() {\\n11:   open();\\n12:   if (flag)\\n13:     return;\\n14:   int ch = getChar();\\n15:   State nextState = getCharType();\\n16:   if (nextState)\\n17:     while (ch)\\n18:       ;\\n19: }\\n20: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n1: /* { dg-do compile } */\n2: /* { dg-options \"-O2 -fstack-clash-protection\" } */\n3: \n4: int flag;\n5: void open();\n6: int getChar();\n7: typedef enum { QUOTE } CharType;\n8: typedef enum { UNQ } State;\n9: CharType getCharType();\n10: void expand() {\n11:   open();\n12:   if (flag)\n13:     return;\n14:   int ch = getChar();\n15:   State nextState = getCharType();\n16:   if (nextState)\n17:     while (ch)\n18:       ;\n19: }\n20: "
  }
}
30. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/target.def",
  "startLine": 6525,
  "endLine": 6560
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL6525-6560\\n6525: that shouldn't be used.\\\\n\\\\\\n6526: \\\\n\\\\\\n6527: (However, if this class is not included in @code{GENERAL_REGS} and all\\\\n\\\\\\n6528: of the insn patterns whose constraints permit this class are\\\\n\\\\\\n6529: controlled by target switches, then GCC will automatically avoid using\\\\n\\\\\\n6530: these registers when the target switches are opposed to them.)\\\",\\n6531:  void, (void),\\n6532:  hook_void_void)\\n6533: \\n6534: DEFHOOK\\n6535: (stack_clash_protection_alloca_probe_range,\\n6536:  \\\"Some targets have an ABI defined interval for which no probing needs to be done.\\\\n\\\\\\n6537: When a probe does need to be done this same interval is used as the probe distance\\\\n\\\\\\n6538: up when doing stack clash protection for alloca.\\\\n\\\\\\n6539: On such targets this value can be set to override the default probing up interval.\\\\n\\\\\\n6540: Define this variable to return nonzero if such a probe range is required or zero otherwise.\\\\n\\\\\\n6541: Defining this hook also requires your functions which make use of alloca to have at least 8 byes\\\\n\\\\\\n6542: of outgoing arguments.  If this is not the case the stack will be corrupted.\\\\n\\\\\\n6543: You need not define this macro if it would always have the value zero.\\\",\\n6544:  HOST_WIDE_INT, (void),\\n6545:  default_stack_clash_protection_alloca_probe_range)\\n6546: \\n6547: \\n6548: /* Functions specific to the C family of frontends.  */\\n6549: #undef HOOK_PREFIX\\n6550: #define HOOK_PREFIX \\\"TARGET_C_\\\"\\n6551: HOOK_VECTOR (TARGET_C, c)\\n6552: \\n6553: /* ??? Documenting this hook requires a GFDL license grant.  */\\n6554: DEFHOOK_UNDOC\\n6555: (mode_for_suffix,\\n6556: \\\"Return machine mode for non-standard constant literal suffix @var{c},\\\\\\n6557:  or VOIDmode if non-standard suffixes are unsupported.\\\",\\n6558:  machine_mode, (char c),\\n6559:  default_mode_for_suffix)\\n6560: \\n6561: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL6525-6560\n6525: that shouldn't be used.\\n\\\n6526: \\n\\\n6527: (However, if this class is not included in @code{GENERAL_REGS} and all\\n\\\n6528: of the insn patterns whose constraints permit this class are\\n\\\n6529: controlled by target switches, then GCC will automatically avoid using\\n\\\n6530: these registers when the target switches are opposed to them.)\",\n6531:  void, (void),\n6532:  hook_void_void)\n6533: \n6534: DEFHOOK\n6535: (stack_clash_protection_alloca_probe_range,\n6536:  \"Some targets have an ABI defined interval for which no probing needs to be done.\\n\\\n6537: When a probe does need to be done this same interval is used as the probe distance\\n\\\n6538: up when doing stack clash protection for alloca.\\n\\\n6539: On such targets this value can be set to override the default probing up interval.\\n\\\n6540: Define this variable to return nonzero if such a probe range is required or zero otherwise.\\n\\\n6541: Defining this hook also requires your functions which make use of alloca to have at least 8 byes\\n\\\n6542: of outgoing arguments.  If this is not the case the stack will be corrupted.\\n\\\n6543: You need not define this macro if it would always have the value zero.\",\n6544:  HOST_WIDE_INT, (void),\n6545:  default_stack_clash_protection_alloca_probe_range)\n6546: \n6547: \n6548: /* Functions specific to the C family of frontends.  */\n6549: #undef HOOK_PREFIX\n6550: #define HOOK_PREFIX \"TARGET_C_\"\n6551: HOOK_VECTOR (TARGET_C, c)\n6552: \n6553: /* ??? Documenting this hook requires a GFDL license grant.  */\n6554: DEFHOOK_UNDOC\n6555: (mode_for_suffix,\n6556: \"Return machine mode for non-standard constant literal suffix @var{c},\\\n6557:  or VOIDmode if
...
31. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
32. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.cc",
  "startLine": 1,
  "endLine": 100
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-100\\n1: /* Subroutines used for code generation on IA-32.\\n2:    Copyright (C) 1988-2026 Free Software Foundation, Inc.\\n3: \\n4: This file is part of GCC.\\n5: \\n6: GCC is free software; you can redistribute it and/or modify\\n7: it under the terms of the GNU General Public License as published by\\n8: the Free Software Foundation; either version 3, or (at your option)\\n9: any later version.\\n10: \\n11: GCC is distributed in the hope that it will be useful,\\n12: but WITHOUT ANY WARRANTY; without even the implied warranty of\\n13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n14: GNU General Public License for more details.\\n15: \\n16: You should have received a copy of the GNU General Public License\\n17: along with GCC; see the file COPYING3.  If not see\\n18: <http://www.gnu.org/licenses/>.  */\\n19: \\n20: #define INCLUDE_STRING\\n21: #define IN_TARGET_CODE 1\\n22: \\n23: #include \\\"config.h\\\"\\n24: #include \\\"system.h\\\"\\n25: #include \\\"coretypes.h\\\"\\n26: #include \\\"backend.h\\\"\\n27: #include \\\"rtl.h\\\"\\n28: #include \\\"tree.h\\\"\\n29: #include \\\"memmodel.h\\\"\\n30: #include \\\"gimple.h\\\"\\n31: #include \\\"cfghooks.h\\\"\\n32: #include \\\"cfgloop.h\\\"\\n33: #include \\\"df.h\\\"\\n34: #include \\\"tm_p.h\\\"\\n35: #include \\\"stringpool.h\\\"\\n36: #include \\\"expmed.h\\\"\\n37: #include \\\"optabs.h\\\"\\n38: #include \\\"regs.h\\\"\\n39: #include \\\"emit-rtl.h\\\"\\n40: #include \\\"recog.h\\\"\\n41: #include \\\"cgraph.h\\\"\\n42: #include \\\"diagnostic.h\\\"\\n43: #include \\\"cfgbuild.h\\\"\\n44: #include \\\"alias.h\\\"\\n45: #include \\\"fold-const.h\\\"\\n46: #include \\\"attribs.h\\\"\\n47: #include \\\"calls.h\\\"\\n48: #include \\\"stor-layout.h\\\"\\n49: #include \\\"varasm.h\\\"\\n50: #include \\\"output.h\\\"\\n51: #include \\\"insn-attr.h\\\"\\n52: #include \\\"flags.h\\\"\\n53: #include \\\"except.h\\\"\\n54: #include \\\"explow.h\\\"\\n55: #include \\\"expr.h\\\"\\n56: #include \\\"cfgrtl.h\\\"\\n57: #include \\\"common/common-target.h\\\"\\n58: #include \\\"langhooks.h\\\"\\n59: #include \\\"reload.h\\\"\\n60: #include \\\"gimplify.h\\\"\\n61: #include \\\"dwarf2.h\\\"\\n62: #include \\\"tm-constrs.h\\\"\\n63: #include \\\"cselib.h\\\"\\n64: #include \\\"sched-int.h\\\"\\n65: #include \\\"opts.h\\\"\\n66: #include \\\"tree-pass.h\\\"\\n67: #include \\\"context.h\\\"\\n68: #include \\\"pass_manager.h\\\"\\n69: #include \\\"target-globals.h\\\"\\n70: #include \\\"gimple-iterator.h\\\"\\n71: #include \\\"gimple-fold.h\\\"\\n72: #include \\\"tree-vectorizer.h\\\"\\n73: #include \\\"shrink-wrap.h\\\"\\n74: #include \\\"builtins.h\\\"\\n75: #include \\\"rtl-iter.h\\\"\\n76: #include \\\"tree-iterator.h\\\"\\n77: #include \\\"dbgcnt.h\\\"\\n78: #include \\\"case-cfn-macros.h\\\"\\n79: #include \\\"dojump.h\\\"\\n80: #include \\\"fold-const-call.h\\\"\\n81: #include \\\"tree-vrp.h\\\"\\n82: #include \\\"tree-ssanames.h\\\"\\n83: #include \\\"selftest.h\\\"\\n84: #include \\\"selftest-rtl.h\\\"\\n85: #include \\\"print-rtl.h\\\"\\n86: #include \\\"intl.h\\\"\\n87: #include \\\"ifcvt.h\\\"\\n88: #include \\\"symbol-summary.h\\\"\\n89: #include \\\"sreal.h\\\"\\n90: #include \\\"ipa-cp.h\\\"\\n91: #include \\\"ipa-prop.h\\\"\\n92: #include \\\"ipa-fnsummary.h\\\"\\n93: #include \\\"wide-int-bitmask.h\\\"\\n94: #include \\\"tree-vector-builder.h\\\"\\n95: #include \\\"debug.h\\\"\\n96: #include \\\"dwarf2out.h\\\"\\n97: #include \\\"i386-options.h\\\"\\n98: #include \\\"i386-builtins.h\\\"\\n99: #include \\\"i386-expand.h\\\"\\n100: #include \\\"i386-features.h\\\"\\n101: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-100\n1: /* Subroutines used 
...
33. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"ix86_expand_prologue\" OR \"anti_adjust_stack_and_probe_stack_clash\" file:config/i386"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\\n34: extern void ix86_expand_prologue (void);\\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\\n36: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n21106:   \\\"\\\"\\n21107:   \\\"ix86_expand_prologue (); DONE;\\\")\\n21108: \\n21109: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n21106:   \"\"\n21107:   \"ix86_expand_prologue (); DONE;\")\n21108: \n21109: \n"
  }
}
34. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"void ix86_expand_prologue\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\\n34: extern void ix86_expand_prologue (void);\\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\\n36: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n33: extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);\n34: extern void ix86_expand_prologue (void);\n35: extern void ix86_maybe_emit_epilogue_vzeroupper (void);\n36: \n"
  }
}
35. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ ix86_expand_prologue file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
36. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ stack_clash file:gcc/config"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-logue.cc\\n1553: static rtx_insn *\\n1554: rs6000_emit_probe_stack_range_stack_clash (HOST_WIDE_INT orig_size,\\n1555: \\t\\t\\t\\t\\t   rtx copy_reg)\\n1556: \\n1950: static const char *\\n1951: output_probe_stack_range_stack_clash (rtx reg1, rtx reg2, rtx reg3)\\n1952: {\\n1953: \\n1529: static HOST_WIDE_INT\\n1530: get_stack_clash_protection_probe_interval (void)\\n1531: {\\n1532: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64.h\\n102:    before probing has to be done for stack clash protection.  */\\n103: #define STACK_CLASH_CALLER_GUARD 1024\\n104: \\n105: \\n106:    outgoing arguments to be when stack-clash is enabled.  */\\n107: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\\n108: \\n109: \\n110:    generating stack clash probes.  */\\n111: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n112: \\n113: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.h\\n1305:    before probing has to be done for stack clash protection.  */\\n1306: #define STACK_CLASH_CALLER_GUARD 1024\\n1307: \\n1308: \\n1309:    generating stack clash probes.  */\\n1310: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n1311: \\n1312: \\n1313:    outgoing arguments to be when stack-clash is enabled.  */\\n1314: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\\n1315: \\n1316: /* Allocate a minimum of STACK_CLASH_MIN_BYTES_OUTGOING_ARGS bytes for the\\n1317:    outgoing arguments if stack clash protection is enabled.  This is essential\\n1318: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.h\\n672:    generating stack clash probes.  */\\n673: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n674: \\n675: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.cc\\n265: /* Size of guard page.  */\\n266: #define STACK_CLASH_PROTECTION_GUARD_SIZE \\\\\\n267:   (1 << param_stack_clash_protection_guard_size)\\n268: \\n269: \\n1108:   if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK\\n1109:       || (flag_stack_clash_protection\\n1110: \\t  && frame->total_size > STACK_CLASH_PROTECTION_GUARD_SIZE))\\n1111:     return min_first_step;\\n1112: \\n1152: \\n1153:   if (flag_stack_clash_protection)\\n1154:     interval = STACK_CLASH_PROTECTION_GUARD_SIZE;\\n1155:   else\\n1156: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\\n15598: static HOST_WIDE_INT\\n15599: riscv_stack_clash_protection_alloca_probe_range (void)\\n15600: {\\n15601:   return STACK_CLASH_CALLER_GUARD;\\n15602: }\\n15603: \\n16846: \\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\\\\n16849:   riscv_stack_clash_protection_alloca_probe_range\\n16850: \\n16851: \\n9521:   emit_stack_probe (plus_constant (Pmode, stack_pointer_rtx,\\n9522: \\t\\t    STACK_CLASH_CALLER_GUARD));\\n9523:   emit_insn (gen_blockage ());\\n9524: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/configure.ac\\n891: [Set the default stack clash protection guard size for specific targets as a power of two in bytes.])],\\n892: [DEFAULT_STK_CLASH_GUARD_SIZE=\\\"$with_stack_clash_protection_guard_size\\\"], [DEFAULT_STK_CLASH_GUARD_SIZE=0])\\n893: if test $DEFAULT_STK_CLASH_GUARD_SIZE -ne 0 \\\\\\n894: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/alpha/alpha.cc\\n8478:   probed_size = frame_size;\\n8479:   if (flag_stack_check || flag_stack_clash_protection)\\n8480:     probed_size += get_stack_check_protect ();\\n8481: \\n8493: \\t  if ((sa_size == 0 && probed_size > probed - 4096)\\n8494: \\t      || flag_stack_check || flag_stack_clash_protection)\\n8495: \\t    emit_insn (gen_stack_probe_internal (GEN_INT (-probed_size)));\\n8496: \\n8524:       if ((leftover > 4096 && sa_size == 0)\\n8525: \\t  || flag_stack_check || flag_stack_clash_protection)\\n8526: \\t{\\n8527: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips.cc\\n12625:   if (flag_stack_ch
...
37. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"flag_stack_clash_protection\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
38. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"flag_stack_clash_protection\" file:i386-expand.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
39. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"probe_stack_range\" file:config/i386"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n102: extern const char *output_adjust_stack_and_probe (rtx);\\n103: extern const char *output_probe_stack_range (rtx, rtx);\\n104: \\n105: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n233:   UNSPECV_STACK_PROBE\\n234:   UNSPECV_PROBE_STACK_RANGE\\n235:   UNSPECV_ALIGN\\n236: \\n27820: \\t(unspec_volatile:P [(match_operand:P 1 \\\"register_operand\\\" \\\"0\\\")]\\n27821: \\t\\t\\t    UNSPECV_PROBE_STACK_RANGE))\\n27822:    (set (reg:P SP_REG)\\n27823: \\n27833: \\t\\t\\t    (match_operand:P 2 \\\"const_int_operand\\\")]\\n27834: \\t\\t\\t    UNSPECV_PROBE_STACK_RANGE))\\n27835:    (clobber (reg:CC FLAGS_REG))]\\n27836: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n105: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n233:   UNSPECV_STACK_PROBE\n234:   UNSPECV_PROBE_STACK_RANGE\n235:   UNSPECV_ALIGN\n236: \n27820: \t(unspec_volatile:P [(match_operand:P 1 \"register_operand\" \"0\")]\n27821: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27822:    (set (reg:P SP_REG)\n27823: \n27833: \t\t\t    (match_operand:P 2 \"const_int_operand\")]\n27834: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27835:    (clobber (reg:CC FLAGS_REG))]\n27836: \n"
  }
}
40. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"ix86_adjust_stack_and_probe\" OR \"probe_stack\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
41. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\" OR \"output_probe_stack_range\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
42. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\" OR \"output_probe_stack_range\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\\n102: extern const char *output_adjust_stack_and_probe (rtx);\\n103: extern const char *output_probe_stack_range (rtx, rtx);\\n104: \\n105: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-logue.cc\\n1872: static const char *\\n1873: output_probe_stack_range_1 (rtx reg1, rtx reg2)\\n1874: {\\n1875: \\n1986: \\n1987: /* Wrapper around the output_probe_stack_range routines.  */\\n1988: const char *\\n1989: output_probe_stack_range (rtx reg1, rtx reg2, rtx reg3)\\n1990: {\\n1991: \\n1950: static const char *\\n1951: output_probe_stack_range_stack_clash (rtx reg1, rtx reg2, rtx reg3)\\n1952: {\\n1953: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64-protos.h\\n61: extern const char *get_bundle_name (int);\\n62: extern const char *output_probe_stack_range (rtx, rtx);\\n63: \\n64: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/sparc/sparc-protos.h\\n80: extern const char *output_v9branch (rtx, rtx, int, int, int, int, rtx_insn *);\\n81: extern const char *output_probe_stack_range (rtx, rtx);\\n82: extern const char *output_cbcond (rtx, rtx, rtx_insn *);\\n83: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch-protos.h\\n148: extern const char *loongarch_lsx_output_division (const char *, rtx *);\\n149: extern const char *loongarch_output_probe_stack_range (rtx, rtx, rtx);\\n150: extern bool loongarch_hard_regno_rename_ok (unsigned int, unsigned int);\\n151: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips-protos.h\\n320: extern const char *mips_msa_output_shift_immediate (const char *, rtx *);\\n321: extern const char *mips_output_probe_stack_range (rtx, rtx);\\n322: extern bool mips_hard_regno_rename_ok (unsigned int, unsigned int);\\n323: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/rs6000/rs6000-protos.h\\n123: extern char * output_cbranch (rtx, const char *, int, rtx_insn *);\\n124: extern const char * output_probe_stack_range (rtx, rtx, rtx);\\n125: extern void rs6000_emit_dot_insn (rtx dst, rtx src, int dot, rtx ccreg);\\n126: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/arm/arm-protos.h\\n178: extern const char *output_return_instruction (rtx, bool, bool, bool);\\n179: extern const char *output_probe_stack_range (rtx, rtx);\\n180: extern void arm_poke_function_name (FILE *, const char *);\\n181: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64-protos.h\\n1028: const char * aarch64_gen_far_branch (rtx *, int, const char *, const char *);\\n1029: const char * aarch64_output_probe_stack_range (rtx, rtx);\\n1030: const char * aarch64_output_probe_sve_stack_clash (rtx, rtx, rtx, rtx);\\n1031: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64.cc\\n3443: const char *\\n3444: output_probe_stack_range (rtx reg1, rtx reg2)\\n3445: {\\n3446: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.cc\\n1259: const char *\\n1260: loongarch_output_probe_stack_range (rtx reg1, rtx reg2, rtx reg3)\\n1261: {\\n1262: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/sparc/sparc.cc\\n5728: const char *\\n5729: output_probe_stack_range (rtx reg1, rtx reg2)\\n5730: {\\n5731: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/mips/mips.cc\\n12551: const char *\\n12552: mips_output_probe_stack_range (rtx reg1, rtx reg2)\\n12553: {\\n12554: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.md\\n3931: {\\n3932:   return loongarch_output_probe_stack_range (operands[0],\\n3933: \\t\\t\\t\\t\\t     operands[2],\\n3934: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/ia64/ia64.md\\n5236:   \\\"\\\"\\n5237:   \\\"* return output_probe_stack_range (operands[0], operands[2]);\\\"\\n5238:   [(set_attr \\\"itanium_class\\\" \\\"unknown\\\")\\n5239: \\n\"}",
  "structuredContent": {
    "text"
...
43. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\" file:i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
44. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\" OR \"ix86_expand_prologue\" file:i386-expand.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
45. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\\n102: extern const char *output_adjust_stack_and_probe (rtx);\\n103: extern const char *output_probe_stack_range (rtx, rtx);\\n104: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n27826:   \\\"\\\"\\n27827:   \\\"* return output_adjust_stack_and_probe (operands[0]);\\\"\\n27828:   [(set_attr \\\"type\\\" \\\"multi\\\")])\\n27829: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n"
  }
}
46. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.md",
  "startLine": 27800,
  "endLine": 27850
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.md%3FL27800-27850\\n27800: {\\n27801:   emit_insn (gen_probe_stack_1\\n27802: \\t     (word_mode, operands[0], const0_rtx));\\n27803:   DONE;\\n27804: })\\n27805: \\n27806: ;; Use OR for stack probes, this is shorter.\\n27807: (define_insn \\\"@probe_stack_1_<mode>\\\"\\n27808:   [(set (match_operand:W 0 \\\"memory_operand\\\" \\\"=m\\\")\\n27809: \\t(unspec:W [(match_operand:W 1 \\\"const0_operand\\\")]\\n27810: \\t\\t  UNSPEC_PROBE_STACK))\\n27811:    (clobber (reg:CC FLAGS_REG))]\\n27812:   \\\"\\\"\\n27813:   \\\"or{<imodesuffix>}\\\\t{%1, %0|%0, %1}\\\"\\n27814:   [(set_attr \\\"type\\\" \\\"alu1\\\")\\n27815:    (set_attr \\\"mode\\\" \\\"<MODE>\\\")\\n27816:    (set_attr \\\"length_immediate\\\" \\\"1\\\")])\\n27817:   \\n27818: (define_insn \\\"@adjust_stack_and_probe_<mode>\\\"\\n27819:   [(set (match_operand:P 0 \\\"register_operand\\\" \\\"=r\\\")\\n27820: \\t(unspec_volatile:P [(match_operand:P 1 \\\"register_operand\\\" \\\"0\\\")]\\n27821: \\t\\t\\t    UNSPECV_PROBE_STACK_RANGE))\\n27822:    (set (reg:P SP_REG)\\n27823:         (minus:P (reg:P SP_REG) (match_operand:P 2 \\\"const_int_operand\\\")))\\n27824:    (clobber (reg:CC FLAGS_REG))\\n27825:    (clobber (mem:BLK (scratch)))]\\n27826:   \\\"\\\"\\n27827:   \\\"* return output_adjust_stack_and_probe (operands[0]);\\\"\\n27828:   [(set_attr \\\"type\\\" \\\"multi\\\")])\\n27829: \\n27830: (define_insn \\\"@probe_stack_range_<mode>\\\"\\n27831:   [(set (match_operand:P 0 \\\"register_operand\\\" \\\"=r\\\")\\n27832: \\t(unspec_volatile:P [(match_operand:P 1 \\\"register_operand\\\" \\\"0\\\")\\n27833: \\t\\t\\t    (match_operand:P 2 \\\"const_int_operand\\\")]\\n27834: \\t\\t\\t    UNSPECV_PROBE_STACK_RANGE))\\n27835:    (clobber (reg:CC FLAGS_REG))]\\n27836:   \\\"\\\"\\n27837:   \\\"* return output_probe_stack_range (operands[0], operands[2]);\\\"\\n27838:   [(set_attr \\\"type\\\" \\\"multi\\\")])\\n27839: \\n27840: (define_expand \\\"builtin_setjmp_receiver\\\"\\n27841:   [(label_ref (match_operand 0))]\\n27842:   \\\"!TARGET_64BIT && flag_pic\\\"\\n27843: {\\n27844: #if TARGET_MACHO\\n27845:   if (TARGET_MACHO)\\n27846:     {\\n27847:       rtx xops[3];\\n27848:       rtx_code_label *label_rtx = gen_label_rtx ();\\n27849:       emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx));\\n27850:       xops[0] = xops[1] = pic_offset_table_rtx;\\n27851: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.md%3FL27800-27850\n27800: {\n27801:   emit_insn (gen_probe_stack_1\n27802: \t     (word_mode, operands[0], const0_rtx));\n27803:   DONE;\n27804: })\n27805: \n27806: ;; Use OR for stack probes, this is shorter.\n27807: (define_insn \"@probe_stack_1_<mode>\"\n27808:   [(set (match_operand:W 0 \"memory_operand\" \"=m\")\n27809: \t(unspec:W [(match_operand:W 1 \"const0_operand\")]\n27810: \t\t  UNSPEC_PROBE_STACK))\n27811:    (clobber (reg:CC FLAGS_REG))]\n27812:   \"\"\n27813:   \"or{<imodesuffix>}\\t{%1, %0|%0, %1}\"\n27814:   [(set_attr \"type\" \"alu1\")\n27815:    (set_attr \"mode\" \"<MODE>\")\n27816:    (set_attr \"length_immediate\" \"1\")])\n27817:   \n27818: (define_insn \"@adjust_stack_and_probe_<mode>\"\n27819:   [(set (match_operand:P 0 \"register_operand\" \"=r\")\n27820: \t(unspec_volatile:P [(match_operand:P 1 \"register_operand\" \"0\")]\n27821: \t\t\t    UNSPECV_PROBE_STACK_RANGE))\n27822:    (set (reg:P SP_REG)\n27823:         (minus:P (reg:P SP_REG) (match_operand:P 2 \"const_int_operand\")))\n27824:    (clobber (reg:CC FLAGS_REG))\n27825:    (clobber (mem:BLK (scratch)))]\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n27830: (define_insn \"@probe_stack_range
...
47. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"output_adjust_stack_and_probe\" file:config/i386/i386.cc"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
48. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"const char\" \"output_adjust_stack_and_probe\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n96: \\n97: extern const char *output_set_got (rtx, rtx);\\n98: extern const char *output_387_binary_op (rtx_insn *, rtx*);\\n99: extern const char *output_387_reg_move (rtx_insn *, rtx*);\\n100: extern const char *output_fix_trunc (rtx_insn *, rtx*, bool);\\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\\n102: extern const char *output_adjust_stack_and_probe (rtx);\\n103: extern const char *output_probe_stack_range (rtx, rtx);\\n104: \\n105: \\n320: /* In winnt.cc  */\\n321: extern void i386_pe_record_external_function (tree, const char *);\\n322: extern bool i386_pe_binds_local_p (const_tree);\\n323: extern const char *i386_pe_strip_name_encoding_full (const char *);\\n324: extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,\\n325: \\t\\t\\t\\t\\t\\t    const char *,\\n326: \\t\\t\\t\\t\\t\\t    HOST_WIDE_INT,\\n327: \\n201: extern bool ix86_function_arg_regno_p (int);\\n202: extern void ix86_asm_output_function_label (FILE *, const char *, tree);\\n203: extern void ix86_asm_output_labelref (FILE *, const char *, const char *);\\n204: extern void ix86_call_abi_override (const_tree);\\n205: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n3165:   char buf[128];\\n3166:   const char *ops;\\n3167:   const char *suffix;\\n3168: \\n3169: \\n29664: {\\n29665:   static const char * const patterns[4] = {\\n29666:    \\\"prefetchnta\\\\t%a0\\\", \\\"prefetcht2\\\\t%a0\\\", \\\"prefetcht1\\\\t%a0\\\", \\\"prefetcht0\\\\t%a0\\\"\\n29667: \\n29701: {\\n29702:   static const char * const patterns[2] = {\\n29703:     \\\"prefetchit1\\\\t%a0\\\", \\\"prefetchit0\\\\t%a0\\\"\\n29704: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n96: \n97: extern const char *output_set_got (rtx, rtx);\n98: extern const char *output_387_binary_op (rtx_insn *, rtx*);\n99: extern const char *output_387_reg_move (rtx_insn *, rtx*);\n100: extern const char *output_fix_trunc (rtx_insn *, rtx*, bool);\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n105: \n320: /* In winnt.cc  */\n321: extern void i386_pe_record_external_function (tree, const char *);\n322: extern bool i386_pe_binds_local_p (const_tree);\n323: extern const char *i386_pe_strip_name_encoding_full (const char *);\n324: extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,\n325: \t\t\t\t\t\t    const char *,\n326: \t\t\t\t\t\t    HOST_WIDE_INT,\n327: \n201: extern bool ix86_function_arg_regno_p (int);\n202: extern void ix86_asm_output_function_label (FILE *, const char *, tree);\n203: extern void ix86_asm_output_labelref (FILE *, const char *, const char *);\n204: extern void ix86_call_abi_override (const_tree);\n205: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n3165:   char buf[128];\n3166:   const char *ops;\n3167:   const char *suffix;\n3168: \n3169: \n29664: {\n29665:   static const char * const patterns[4] = {\n29666:    \"prefetchnta\\t%a0\", \"prefetcht2\\t%a0\", \"prefetcht1\\t%a0\", \"prefetcht0\\t%a0\"\n29667: \n29701: {\n29702:   static const char * const patterns[2] = {\n29703:     \"prefetchit1\\t%a0\", \"prefetchit0\\t%a0\"\n29704: \n"
  }
}
49. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ output_adjust_stack_and_probe"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\\n27826:   \\\"\\\"\\n27827:   \\\"* return output_adjust_stack_and_probe (operands[0]);\\\"\\n27828:   [(set_attr \\\"type\\\" \\\"multi\\\")])\\n27829: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\\n102: extern const char *output_adjust_stack_and_probe (rtx);\\n103: extern const char *output_probe_stack_range (rtx, rtx);\\n104: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386.md\n27826:   \"\"\n27827:   \"* return output_adjust_stack_and_probe (operands[0]);\"\n27828:   [(set_attr \"type\" \"multi\")])\n27829: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/i386/i386-protos.h\n101: extern const char *output_fp_compare (rtx_insn *, rtx*, bool, bool);\n102: extern const char *output_adjust_stack_and_probe (rtx);\n103: extern const char *output_probe_stack_range (rtx, rtx);\n104: \n"
  }
}
50. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.cc",
  "startLine": 1,
  "endLine": 50
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-50\\n1: /* Subroutines used for code generation on IA-32.\\n2:    Copyright (C) 1988-2026 Free Software Foundation, Inc.\\n3: \\n4: This file is part of GCC.\\n5: \\n6: GCC is free software; you can redistribute it and/or modify\\n7: it under the terms of the GNU General Public License as published by\\n8: the Free Software Foundation; either version 3, or (at your option)\\n9: any later version.\\n10: \\n11: GCC is distributed in the hope that it will be useful,\\n12: but WITHOUT ANY WARRANTY; without even the implied warranty of\\n13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n14: GNU General Public License for more details.\\n15: \\n16: You should have received a copy of the GNU General Public License\\n17: along with GCC; see the file COPYING3.  If not see\\n18: <http://www.gnu.org/licenses/>.  */\\n19: \\n20: #define INCLUDE_STRING\\n21: #define IN_TARGET_CODE 1\\n22: \\n23: #include \\\"config.h\\\"\\n24: #include \\\"system.h\\\"\\n25: #include \\\"coretypes.h\\\"\\n26: #include \\\"backend.h\\\"\\n27: #include \\\"rtl.h\\\"\\n28: #include \\\"tree.h\\\"\\n29: #include \\\"memmodel.h\\\"\\n30: #include \\\"gimple.h\\\"\\n31: #include \\\"cfghooks.h\\\"\\n32: #include \\\"cfgloop.h\\\"\\n33: #include \\\"df.h\\\"\\n34: #include \\\"tm_p.h\\\"\\n35: #include \\\"stringpool.h\\\"\\n36: #include \\\"expmed.h\\\"\\n37: #include \\\"optabs.h\\\"\\n38: #include \\\"regs.h\\\"\\n39: #include \\\"emit-rtl.h\\\"\\n40: #include \\\"recog.h\\\"\\n41: #include \\\"cgraph.h\\\"\\n42: #include \\\"diagnostic.h\\\"\\n43: #include \\\"cfgbuild.h\\\"\\n44: #include \\\"alias.h\\\"\\n45: #include \\\"fold-const.h\\\"\\n46: #include \\\"attribs.h\\\"\\n47: #include \\\"calls.h\\\"\\n48: #include \\\"stor-layout.h\\\"\\n49: #include \\\"varasm.h\\\"\\n50: #include \\\"output.h\\\"\\n51: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL1-50\n1: /* Subroutines used for code generation on IA-32.\n2:    Copyright (C) 1988-2026 Free Software Foundation, Inc.\n3: \n4: This file is part of GCC.\n5: \n6: GCC is free software; you can redistribute it and/or modify\n7: it under the terms of the GNU General Public License as published by\n8: the Free Software Foundation; either version 3, or (at your option)\n9: any later version.\n10: \n11: GCC is distributed in the hope that it will be useful,\n12: but WITHOUT ANY WARRANTY; without even the implied warranty of\n13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n14: GNU General Public License for more details.\n15: \n16: You should have received a copy of the GNU General Public License\n17: along with GCC; see the file COPYING3.  If not see\n18: <http://www.gnu.org/licenses/>.  */\n19: \n20: #define INCLUDE_STRING\n21: #define IN_TARGET_CODE 1\n22: \n23: #include \"config.h\"\n24: #include \"system.h\"\n25: #include \"coretypes.h\"\n26: #include \"backend.h\"\n27: #include \"rtl.h\"\n28: #include \"tree.h\"\n29: #include \"memmodel.h\"\n30: #include \"gimple.h\"\n31: #include \"cfghooks.h\"\n32: #include \"cfgloop.h\"\n33: #include \"df.h\"\n34: #include \"tm_p.h\"\n35: #include \"stringpool.h\"\n36: #include \"expmed.h\"\n37: #include \"optabs.h\"\n38: #include \"regs.h\"\n39: #include \"emit-rtl.h\"\n40: #include \"recog.h\"\n41: #include \"cgraph.h\"\n42: #include \"diagnostic.h\"\n43: #include \"cfgbuild.h\"\n44: #include \"alias.h\"\n45: #include \"fold-const.h\"\n46: #include \"attribs.h\"\n47: #include \"calls.h\"\n48: #include \"stor-layout.h\"\n49: #include \"varasm.h\"\n50: #include \"output.h\"\n51: "
  }
}
51. ToolSearch @ -

Input

{
  "query": "select:mcp__sourcegraph__sg_go_to_definition",
  "max_results": 1
}

Output

{
  "matches": [
    "mcp__sourcegraph__sg_go_to_definition"
  ],
  "query": "select:mcp__sourcegraph__sg_go_to_definition",
  "total_deferred_tools": 33
}
52. mcp__sourcegraph__sg_go_to_definition @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.md",
  "symbol": "output_adjust_stack_and_probe"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nno definition found for symbol 'output_adjust_stack_and_probe'.\"}",
  "structuredContent": {
    "text": "No results.\n\nno definition found for symbol 'output_adjust_stack_and_probe'."
  }
}
53. mcp__sourcegraph__sg_go_to_definition @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.md",
  "symbol": "output_probe_stack_range"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nno definition found for symbol 'output_probe_stack_range'.\"}",
  "structuredContent": {
    "text": "No results.\n\nno definition found for symbol 'output_probe_stack_range'."
  }
}
54. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/explow.h"
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.h\\n1: /* Export function prototypes from explow.cc.\\n2:    Copyright (C) 2015-2026 Free Software Foundation, Inc.\\n3: \\n4: This file is part of GCC.\\n5: \\n6: GCC is free software; you can redistribute it and/or modify it under\\n7: the terms of the GNU General Public License as published by the Free\\n8: Software Foundation; either version 3, or (at your option) any later\\n9: version.\\n10: \\n11: GCC is distributed in the hope that it will be useful, but WITHOUT ANY\\n12: WARRANTY; without even the implied warranty of MERCHANTABILITY or\\n13: FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\\n14: for more details.\\n15: \\n16: You should have received a copy of the GNU General Public License\\n17: along with GCC; see the file COPYING3.  If not see\\n18: <http://www.gnu.org/licenses/>.  */\\n19: \\n20: #ifndef GCC_EXPLOW_H\\n21: #define GCC_EXPLOW_H\\n22: \\n23: /* Return a memory reference like MEMREF, but which is known to have a\\n24:    valid address.  */\\n25: extern rtx validize_mem (rtx);\\n26: \\n27: extern rtx use_anchored_address (rtx);\\n28: \\n29: /* Copy given rtx to a new temp reg and return that.  */\\n30: extern rtx copy_to_reg (rtx);\\n31: \\n32: /* Like copy_to_reg but always make the reg Pmode.  */\\n33: extern rtx copy_addr_to_reg (rtx);\\n34: \\n35: /* Like copy_to_reg but always make the reg the specified mode MODE.  */\\n36: extern rtx copy_to_mode_reg (machine_mode, rtx);\\n37: \\n38: /* Copy given rtx to given temp reg and return that.  */\\n39: extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);\\n40: \\n41: /* Copy a value to a register if it isn't already a register.\\n42:    Args are mode (in case value is a constant) and the value.  */\\n43: extern rtx force_reg (machine_mode, rtx);\\n44: \\n45: extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);\\n46: extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);\\n47: extern rtx force_highpart_subreg (machine_mode, rtx, machine_mode);\\n48: \\n49: /* Return given rtx, copied into a new temp reg if it was in memory.  */\\n50: extern rtx force_not_mem (rtx);\\n51: \\n52: /* Return mode and signedness to use when an argument or result in the\\n53:    given mode is promoted.  */\\n54: extern machine_mode promote_function_mode (const_tree, machine_mode, int *,\\n55: \\t\\t\\t\\t\\t        const_tree, int);\\n56: \\n57: /* Return mode and signedness to use when an object in the given mode\\n58:    is promoted.  */\\n59: extern machine_mode promote_mode (const_tree, machine_mode, int *);\\n60: \\n61: /* Return mode and signedness to use when object is promoted.  */\\n62: machine_mode promote_decl_mode (const_tree, int *);\\n63: \\n64: /* Return mode and signedness to use when object is promoted.  */\\n65: machine_mode promote_ssa_mode (const_tree, int *);\\n66: \\n67: /* Remove some bytes from the stack.  An rtx says how many.  */\\n68: extern void adjust_stack (rtx);\\n69: \\n70: /* Add some bytes to the stack.  An rtx says how many.  */\\n71: extern void anti_adjust_stack (rtx);\\n72: \\n73: /* Add some bytes to the stack while probing it.  An rtx says how many. */\\n74: extern void anti_adjust_stack_and_probe (rtx, bool);\\n75: \\n76: /* Add some bytes to the stack while probing it.  An rtx says how\\n77:    many.  Add additional probes to prevent stack clashing attacks.  */\\n78: extern void anti_adjust_stack_and_probe_stack_clash (rtx);\\n79: \\n80: /* Support for building allocation/probing loops for stack-clash\\n81:    protection of dyamically allocated stack space.  */\\n82: extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,\\n83: \\t\\t\\t\\t\\t\\t      HOST_WIDE_INT *, rtx);\\n84: extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,\\n85: \\t\\t\\t\\t\\t\\t\\t  rtx, bool);\\n86: extern voi
...
55. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"STACK_CLASH\" file:.h"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/explow.h\\n77:    many.  Add additional probes to prevent stack clashing attacks.  */\\n78: extern void anti_adjust_stack_and_probe_stack_clash (rtx);\\n79: \\n80: \\n81:    protection of dyamically allocated stack space.  */\\n82: extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,\\n83: \\t\\t\\t\\t\\t\\t      HOST_WIDE_INT *, rtx);\\n84: extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,\\n85: \\t\\t\\t\\t\\t\\t\\t  rtx, bool);\\n86: extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx,\\n87: \\t\\t\\t\\t\\t\\t\\trtx, bool);\\n88: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/aarch64/aarch64.h\\n102:    before probing has to be done for stack clash protection.  */\\n103: #define STACK_CLASH_CALLER_GUARD 1024\\n104: \\n105: \\n110:    generating stack clash probes.  */\\n111: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n112: \\n113: \\n106:    outgoing arguments to be when stack-clash is enabled.  */\\n107: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\\n108: \\n109: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/sve/pcs/stack_clash_3.c\\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/function.h\\n639: \\n640: enum stack_clash_probes {\\n641:   NO_PROBE_NO_FRAME,\\n642: \\n646: \\n647: extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);\\n648: \\f\\n649: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.h\\n1305:    before probing has to be done for stack clash protection.  */\\n1306: #define STACK_CLASH_CALLER_GUARD 1024\\n1307: \\n1308: \\n1309:    generating stack clash probes.  */\\n1310: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n1311: \\n1312: \\n1313:    outgoing arguments to be when stack-clash is enabled.  */\\n1314: #define STACK_CLASH_MIN_BYTES_OUTGOING_ARGS 8\\n1315: \\n1316: /* Allocate a minimum of STACK_CLASH_MIN_BYTES_OUTGOING_ARGS bytes for the\\n1317:    outgoing arguments if stack clash protection is enabled.  This is essential\\n1318: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/config/loongarch/loongarch.h\\n672:    generating stack clash probes.  */\\n673: #define STACK_CLASH_MAX_UNROLL_PAGES 4\\n674: \\n675: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C\\n2: // { dg-additional-options \\\"-fstack-protector-strong\\\" { target fstack_protector } }\\n3: // { dg-additional-options \\\"-fstack-clash-protection\\\" { target supports_stack_clash_protection } }\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-1.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-3.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector\\\" } */\\n3: /* { 
...
56. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"define TARGET_STACK_CLASH_PROTECTION\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\\\\n16849:   riscv_stack_clash_protection_alloca_probe_range\\n16850: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n"
  }
}
57. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"TARGET_STACK_CLASH_PROTECTION\" file:defaults.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
58. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"TARGET_STACK_CLASH_PROTECTION\" -\"ALLOCA\""
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
59. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION file:targhooks.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
60. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION file:tm_p.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
61. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/targhooks.h",
  "startLine": 295,
  "endLine": 310
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.h%3FL295-310\\n295: \\t\\t\\t\\t       optimization_type);\\n296: extern unsigned int default_max_noce_ifcvt_seq_cost (edge);\\n297: extern bool default_noce_conversion_profitable_p (rtx_insn *,\\n298: \\t\\t\\t\\t\\t\\t  struct noce_if_info *);\\n299: extern unsigned int default_min_arithmetic_precision (void);\\n300: \\n301: extern enum flt_eval_method\\n302: default_excess_precision (enum excess_precision_type ATTRIBUTE_UNUSED);\\n303: extern bool default_bitint_type_info (int, struct bitint_info *);\\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\\n306: extern void default_select_early_remat_modes (sbitmap);\\n307: extern tree default_preferred_else_value (unsigned, tree, unsigned, tree *);\\n308: extern bool default_instruction_selection (function *, gimple_stmt_iterator *);\\n309: extern bool default_have_speculation_safe_value (bool);\\n310: extern bool speculation_safe_value_not_needed (bool);\\n311: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.h%3FL295-310\n295: \t\t\t\t       optimization_type);\n296: extern unsigned int default_max_noce_ifcvt_seq_cost (edge);\n297: extern bool default_noce_conversion_profitable_p (rtx_insn *,\n298: \t\t\t\t\t\t  struct noce_if_info *);\n299: extern unsigned int default_min_arithmetic_precision (void);\n300: \n301: extern enum flt_eval_method\n302: default_excess_precision (enum excess_precision_type ATTRIBUTE_UNUSED);\n303: extern bool default_bitint_type_info (int, struct bitint_info *);\n304: extern machine_mode default_mode_for_floating_type (enum tree_index);\n305: extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void);\n306: extern void default_select_early_remat_modes (sbitmap);\n307: extern tree default_preferred_else_value (unsigned, tree, unsigned, tree *);\n308: extern bool default_instruction_selection (function *, gimple_stmt_iterator *);\n309: extern bool default_have_speculation_safe_value (bool);\n310: extern bool speculation_safe_value_not_needed (bool);\n311: "
  }
}
62. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/targhooks.cc",
  "startLine": 2740,
  "endLine": 2760
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.cc%3FL2740-2760\\n2740: {\\n2741:   return false;\\n2742: }\\n2743: \\n2744: /* Default implementation for\\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\\n2746: HOST_WIDE_INT\\n2747: default_stack_clash_protection_alloca_probe_range (void)\\n2748: {\\n2749:   return 0;\\n2750: }\\n2751: \\n2752: /* The default implementation of TARGET_EARLY_REMAT_MODES.  */\\n2753: \\n2754: void\\n2755: default_select_early_remat_modes (sbitmap)\\n2756: {\\n2757: }\\n2758: \\n2759: /* The default implementation of TARGET_PREFERRED_ELSE_VALUE.  */\\n2760: \\n2761: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/targhooks.cc%3FL2740-2760\n2740: {\n2741:   return false;\n2742: }\n2743: \n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: default_stack_clash_protection_alloca_probe_range (void)\n2748: {\n2749:   return 0;\n2750: }\n2751: \n2752: /* The default implementation of TARGET_EARLY_REMAT_MODES.  */\n2753: \n2754: void\n2755: default_select_early_remat_modes (sbitmap)\n2756: {\n2757: }\n2758: \n2759: /* The default implementation of TARGET_PREFERRED_ELSE_VALUE.  */\n2760: \n2761: "
  }
}
63. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"supports_stack_clash_protection\" file:lib"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/lib/target-supports.exp\\n13633: #\\n13634: proc check_effective_target_supports_stack_clash_protection { } {\\n13635: \\n13636: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/lib/target-supports.exp\n13633: #\n13634: proc check_effective_target_supports_stack_clash_protection { } {\n13635: \n13636: \n"
  }
}
64. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"supports_stack_clash_protection\""
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.dg/torture/pr82823.C\\n2: // { dg-additional-options \\\"-fstack-clash-protection\\\" }\\n3: // { dg-require-effective-target supports_stack_clash_protection }\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.dg/torture/pr119610.C\\n2: // { dg-additional-options \\\"-fstack-protector-strong\\\" { target fstack_protector } }\\n3: // { dg-additional-options \\\"-fstack-clash-protection\\\" { target supports_stack_clash_protection } }\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-alloca-2.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C\\n2: // { dg-additional-options \\\"-fstack-protector-strong\\\" { target fstack_protector } }\\n3: // { dg-additional-options \\\"-fstack-clash-protection\\\" { target supports_stack_clash_protection } }\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-1.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-2.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-alloca-3.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-3.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-1.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.dg/pr82788.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-probe-interval=10 --param stack-clash-protection-guard-size=12\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: /* { dg-skip-if \\\"RISC-V and AArch64 do not support this interval.\\\" { riscv*-*-* aarch64*-*-* } } */\\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/riscv/stack-check-prologue-8.c\\n2: /* { dg-options \\\"-O2 -march=rv64gc -mabi=lp64d -fstack-clash-protection\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16\\\" } */\\n3: /* { dg-require-effective-target supports_stack_clash_protection } */\\n4: \\n5: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/aarch64/stack-check-prologue-3.c\\n2: /* { dg-options \\\"-O2 -fstack-clash-protection --param stack-clash-prot
...
65. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash_protection_alloca_probe_range\" file:target.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
66. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash_protection\" file:target.h"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
67. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ TARGET_STACK_CLASH_PROTECTION"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\\n16846: \\n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\\\\n16849:   riscv_stack_clash_protection_alloca_probe_range\\n16850: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\\n2744: /* Default implementation for\\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\\n2746: HOST_WIDE_INT\\n2747: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\\n3771: \\n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\\n3774: \\n\\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\\n2997: \\n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\\n2999: \\n3000: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/config/riscv/riscv.cc\n16846: \n16847: #undef TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n16848: #define TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE \\\n16849:   riscv_stack_clash_protection_alloca_probe_range\n16850: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/targhooks.cc\n2744: /* Default implementation for\n2745:   TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.  */\n2746: HOST_WIDE_INT\n2747: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi\n3771: \n3772: @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)\n3773: Some targets have an ABI defined interval for which no probing needs to be done.\n3774: \n\n# github.com/sg-evals/gcc--96dfb333 – gcc/doc/tm.texi.in\n2997: \n2998: @hook TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\n2999: \n3000: \n"
  }
}
68. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/function.h",
  "startLine": 635,
  "endLine": 655
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/function.h%3FL635-655\\n635:    to this function will have that bit clear.  */\\n636: #define MINIMUM_METHOD_BOUNDARY \\\\\\n637:   ((TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn)\\t     \\\\\\n638:    ? MAX (FUNCTION_BOUNDARY, 2 * BITS_PER_UNIT) : FUNCTION_BOUNDARY)\\n639: \\n640: enum stack_clash_probes {\\n641:   NO_PROBE_NO_FRAME,\\n642:   NO_PROBE_SMALL_FRAME,\\n643:   PROBE_INLINE,\\n644:   PROBE_LOOP\\n645: };\\n646: \\n647: extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);\\n648: \\f\\n649: \\n650: extern void push_function_context (void);\\n651: extern void pop_function_context (void);\\n652: \\n653: /* Save and restore status information for a nested function.  */\\n654: extern void free_after_parsing (struct function *);\\n655: extern void free_after_compilation (struct function *);\\n656: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/function.h%3FL635-655\n635:    to this function will have that bit clear.  */\n636: #define MINIMUM_METHOD_BOUNDARY \\\n637:   ((TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn)\t     \\\n638:    ? MAX (FUNCTION_BOUNDARY, 2 * BITS_PER_UNIT) : FUNCTION_BOUNDARY)\n639: \n640: enum stack_clash_probes {\n641:   NO_PROBE_NO_FRAME,\n642:   NO_PROBE_SMALL_FRAME,\n643:   PROBE_INLINE,\n644:   PROBE_LOOP\n645: };\n646: \n647: extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool);\n648: \f\n649: \n650: extern void push_function_context (void);\n651: extern void pop_function_context (void);\n652: \n653: /* Save and restore status information for a nested function.  */\n654: extern void free_after_parsing (struct function *);\n655: extern void free_after_compilation (struct function *);\n656: "
  }
}
69. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/target.def",
  "startLine": 1,
  "endLine": 50
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL1-50\\n1: /* Target hook definitions.\\n2:    Copyright (C) 2001-2026 Free Software Foundation, Inc.\\n3: \\n4:    This program is free software; you can redistribute it and/or modify it\\n5:    under the terms of the GNU General Public License as published by the\\n6:    Free Software Foundation; either version 3, or (at your option) any\\n7:    later version.\\n8: \\n9:    This program is distributed in the hope that it will be useful,\\n10:    but WITHOUT ANY WARRANTY; without even the implied warranty of\\n11:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n12:    GNU General Public License for more details.\\n13: \\n14:    You should have received a copy of the GNU General Public License\\n15:    along with this program; see the file COPYING3.  If not see\\n16:    <http://www.gnu.org/licenses/>.\\n17: \\n18:    In other words, you are welcome to use, share and improve this program.\\n19:    You are forbidden to forbid anyone else to use, share and improve\\n20:    what you give them.   Help stamp out software-hoarding!  */\\n21: \\n22: /* See target-hooks-macros.h for details of macros that should be\\n23:    provided by the including file, and how to use them here.  */\\n24: #include \\\"target-hooks-macros.h\\\"\\n25: \\n26: #undef HOOK_TYPE\\n27: #define HOOK_TYPE \\\"Target Hook\\\"\\n28: \\n29: HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)\\n30: \\n31: /* Functions that output assembler for the target.  */\\n32: #define HOOK_PREFIX \\\"TARGET_ASM_\\\"\\n33: HOOK_VECTOR (TARGET_ASM_OUT, asm_out)\\n34: \\n35: /* Opening and closing parentheses for asm expression grouping.  */\\n36: DEFHOOKPOD\\n37: (open_paren,\\n38:  \\\"These target hooks are C string constants, describing the syntax in the\\\\n\\\\\\n39: assembler for grouping arithmetic expressions.  If not overridden, they\\\\n\\\\\\n40: default to normal parentheses, which is correct for most assemblers.\\\",\\n41:  const char *, \\\"(\\\")\\n42: DEFHOOKPODX (close_paren, const char *, \\\")\\\")\\n43: \\n44: /* Assembler instructions for creating various kinds of integer object.  */\\n45: DEFHOOKPOD\\n46: (byte_op,\\n47:  \\\"@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP\\\\n\\\\\\n48: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PSI_OP\\\\n\\\\\\n49: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP\\\\n\\\\\\n50: @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PDI_OP\\\\n\\\\\\n51: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/target.def%3FL1-50\n1: /* Target hook definitions.\n2:    Copyright (C) 2001-2026 Free Software Foundation, Inc.\n3: \n4:    This program is free software; you can redistribute it and/or modify it\n5:    under the terms of the GNU General Public License as published by the\n6:    Free Software Foundation; either version 3, or (at your option) any\n7:    later version.\n8: \n9:    This program is distributed in the hope that it will be useful,\n10:    but WITHOUT ANY WARRANTY; without even the implied warranty of\n11:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n12:    GNU General Public License for more details.\n13: \n14:    You should have received a copy of the GNU General Public License\n15:    along with this program; see the file COPYING3.  If not see\n16:    <http://www.gnu.org/licenses/>.\n17: \n18:    In other words, you are welcome to use, share and improve this program.\n19:    You are forbidden to forbid anyone else to use, share and improve\n20:    what you give them.   Help stamp out software-hoarding!  */\n21: \n22: /* See target-hooks-macros.h for details of macros that should be\n23:    provided by the including file, and how to use them here.  *
...
70. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386.cc",
  "startLine": 100,
  "endLine": 200
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386.cc%3FL100-200\\n100: #include \\\"i386-features.h\\\"\\n101: #include \\\"function-abi.h\\\"\\n102: #include \\\"rtl-error.h\\\"\\n103: #include \\\"gimple-pretty-print.h\\\"\\n104: \\n105: /* This file should be included last.  */\\n106: #include \\\"target-def.h\\\"\\n107: \\n108: static void ix86_print_operand_address_as (FILE *, rtx, addr_space_t, bool);\\n109: static void ix86_emit_restore_reg_using_pop (rtx, bool = false);\\n110: \\n111: \\n112: #ifndef CHECK_STACK_LIMIT\\n113: #define CHECK_STACK_LIMIT (-1)\\n114: #endif\\n115: \\n116: /* Return index of given mode in mult and division cost tables.  */\\n117: #define MODE_INDEX(mode)\\t\\t\\t\\t\\t\\\\\\n118:   ((mode) == QImode ? 0\\t\\t\\t\\t\\t\\t\\\\\\n119:    : (mode) == HImode ? 1\\t\\t\\t\\t\\t\\\\\\n120:    : (mode) == SImode ? 2\\t\\t\\t\\t\\t\\\\\\n121:    : (mode) == DImode ? 3\\t\\t\\t\\t\\t\\\\\\n122:    : 4)\\n123: \\n124: \\n125: /* Set by -mtune.  */\\n126: const struct processor_costs *ix86_tune_cost = NULL;\\n127: \\n128: /* Set by -mtune or -Os.  */\\n129: const struct processor_costs *ix86_cost = NULL;\\n130: \\n131: /* In case the average insn count for single function invocation is\\n132:    lower than this constant, emit fast (but longer) prologue and\\n133:    epilogue code.  */\\n134: #define FAST_PROLOGUE_INSN_COUNT 20\\n135: \\n136: /* Names for 8 (low), 8 (high), and 16-bit registers, respectively.  */\\n137: static const char *const qi_reg_name[] = QI_REGISTER_NAMES;\\n138: static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES;\\n139: static const char *const hi_reg_name[] = HI_REGISTER_NAMES;\\n140: \\n141: /* Array of the smallest class containing reg number REGNO, indexed by\\n142:    REGNO.  Used by REGNO_REG_CLASS in i386.h.  */\\n143: \\n144: enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER] =\\n145: {\\n146:   /* ax, dx, cx, bx */\\n147:   AREG, DREG, CREG, BREG,\\n148:   /* si, di, bp, sp */\\n149:   SIREG, DIREG, NON_Q_REGS, NON_Q_REGS,\\n150:   /* FP registers */\\n151:   FP_TOP_REG, FP_SECOND_REG, FLOAT_REGS, FLOAT_REGS,\\n152:   FLOAT_REGS, FLOAT_REGS, FLOAT_REGS, FLOAT_REGS,\\n153:   /* arg pointer, flags, fpsr, frame */\\n154:   NON_Q_REGS, NO_REGS, NO_REGS, NON_Q_REGS,\\n155:   /* SSE registers */\\n156:   SSE_FIRST_REG, SSE_REGS, SSE_REGS, SSE_REGS,\\n157:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\\n158:   /* MMX registers */\\n159:   MMX_REGS, MMX_REGS, MMX_REGS, MMX_REGS,\\n160:   MMX_REGS, MMX_REGS, MMX_REGS, MMX_REGS,\\n161:   /* REX registers */\\n162:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n163:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n164:   /* SSE REX registers */\\n165:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\\n166:   SSE_REGS, SSE_REGS, SSE_REGS, SSE_REGS,\\n167:   /* AVX-512 SSE registers */\\n168:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\\n169:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\\n170:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\\n171:   ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS, ALL_SSE_REGS,\\n172:   /* Mask registers.  */\\n173:   ALL_MASK_REGS, MASK_REGS, MASK_REGS, MASK_REGS,\\n174:   MASK_REGS, MASK_REGS, MASK_REGS, MASK_REGS,\\n175:   /* REX2 registers */\\n176:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n177:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n178:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n179:   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,\\n180: };\\n181: \\n182: /* The \\\"default\\\" register map used in 32bit mode.  */\\n183: \\n184: unsigned int const debugger_register_map[FIRST_PSEUDO_REGISTER] =\\n185: {\\n186:   /* general regs */\\n187:   0, 2, 1, 3, 6, 7, 4, 5,\\n188:   /* fp regs */\\n189:   12, 13, 14, 15, 16, 17, 18, 19,\\n190:   /* arg, flags, fps
...
71. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/config/i386/i386-expand.cc",
  "startLine": 1,
  "endLine": 80
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386-expand.cc%3FL1-80\\n1: /* Copyright (C) 1988-2026 Free Software Foundation, Inc.\\n2: \\n3: This file is part of GCC.\\n4: \\n5: GCC is free software; you can redistribute it and/or modify\\n6: it under the terms of the GNU General Public License as published by\\n7: the Free Software Foundation; either version 3, or (at your option)\\n8: any later version.\\n9: \\n10: GCC is distributed in the hope that it will be useful,\\n11: but WITHOUT ANY WARRANTY; without even the implied warranty of\\n12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n13: GNU General Public License for more details.\\n14: \\n15: You should have received a copy of the GNU General Public License\\n16: along with GCC; see the file COPYING3.  If not see\\n17: <http://www.gnu.org/licenses/>.  */\\n18: \\n19: #define IN_TARGET_CODE 1\\n20: \\n21: #include \\\"config.h\\\"\\n22: #include \\\"system.h\\\"\\n23: #include \\\"coretypes.h\\\"\\n24: #include \\\"backend.h\\\"\\n25: #include \\\"rtl.h\\\"\\n26: #include \\\"tree.h\\\"\\n27: #include \\\"memmodel.h\\\"\\n28: #include \\\"gimple.h\\\"\\n29: #include \\\"cfghooks.h\\\"\\n30: #include \\\"cfgloop.h\\\"\\n31: #include \\\"df.h\\\"\\n32: #include \\\"tm_p.h\\\"\\n33: #include \\\"stringpool.h\\\"\\n34: #include \\\"expmed.h\\\"\\n35: #include \\\"optabs.h\\\"\\n36: #include \\\"regs.h\\\"\\n37: #include \\\"emit-rtl.h\\\"\\n38: #include \\\"recog.h\\\"\\n39: #include \\\"cgraph.h\\\"\\n40: #include \\\"diagnostic.h\\\"\\n41: #include \\\"cfgbuild.h\\\"\\n42: #include \\\"alias.h\\\"\\n43: #include \\\"fold-const.h\\\"\\n44: #include \\\"attribs.h\\\"\\n45: #include \\\"calls.h\\\"\\n46: #include \\\"stor-layout.h\\\"\\n47: #include \\\"varasm.h\\\"\\n48: #include \\\"output.h\\\"\\n49: #include \\\"insn-attr.h\\\"\\n50: #include \\\"flags.h\\\"\\n51: #include \\\"except.h\\\"\\n52: #include \\\"explow.h\\\"\\n53: #include \\\"expr.h\\\"\\n54: #include \\\"cfgrtl.h\\\"\\n55: #include \\\"common/common-target.h\\\"\\n56: #include \\\"langhooks.h\\\"\\n57: #include \\\"reload.h\\\"\\n58: #include \\\"gimplify.h\\\"\\n59: #include \\\"dwarf2.h\\\"\\n60: #include \\\"tm-constrs.h\\\"\\n61: #include \\\"cselib.h\\\"\\n62: #include \\\"sched-int.h\\\"\\n63: #include \\\"opts.h\\\"\\n64: #include \\\"tree-pass.h\\\"\\n65: #include \\\"context.h\\\"\\n66: #include \\\"pass_manager.h\\\"\\n67: #include \\\"target-globals.h\\\"\\n68: #include \\\"gimple-iterator.h\\\"\\n69: #include \\\"shrink-wrap.h\\\"\\n70: #include \\\"builtins.h\\\"\\n71: #include \\\"rtl-iter.h\\\"\\n72: #include \\\"tree-iterator.h\\\"\\n73: #include \\\"dbgcnt.h\\\"\\n74: #include \\\"case-cfn-macros.h\\\"\\n75: #include \\\"dojump.h\\\"\\n76: #include \\\"fold-const-call.h\\\"\\n77: #include \\\"tree-vrp.h\\\"\\n78: #include \\\"tree-ssanames.h\\\"\\n79: #include \\\"selftest.h\\\"\\n80: #include \\\"selftest-rtl.h\\\"\\n81: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/config/i386/i386-expand.cc%3FL1-80\n1: /* Copyright (C) 1988-2026 Free Software Foundation, Inc.\n2: \n3: This file is part of GCC.\n4: \n5: GCC is free software; you can redistribute it and/or modify\n6: it under the terms of the GNU General Public License as published by\n7: the Free Software Foundation; either version 3, or (at your option)\n8: any later version.\n9: \n10: GCC is distributed in the hope that it will be useful,\n11: but WITHOUT ANY WARRANTY; without even the implied warranty of\n12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n13: GNU General Public License for more details.\n14: \n15: You should have received a copy of the GNU General Public License\n16: along with GCC; see the file COPYING3.  If not see\n17: <http://www.gnu.org/licenses/>.  
...
72. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash_protection_probe_range\" file:params.opt"
}

Output

{
  "content": "{\"text\":\"No results.\\n\\nNo results found.\"}",
  "structuredContent": {
    "text": "No results.\n\nNo results found."
  }
}
73. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ \"stack_clash_protection\" file:params.opt"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/params.opt\\n1108: -param=stack-clash-protection-guard-size=\\n1109: Common Joined UInteger Var(param_stack_clash_protection_guard_size) Init(12) IntegerRange(12, 30) Param Optimization\\n1110: Size of the stack guard expressed as a power of two in bytes.\\n1111: \\n1112: -param=stack-clash-protection-probe-interval=\\n1113: Common Joined UInteger Var(param_stack_clash_protection_probe_interval) Init(12) IntegerRange(10, 16) Param Optimization\\n1114: Interval in which to probe the stack expressed as a power of two in bytes.\\n1115: \\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/params.opt\n1108: -param=stack-clash-protection-guard-size=\n1109: Common Joined UInteger Var(param_stack_clash_protection_guard_size) Init(12) IntegerRange(12, 30) Param Optimization\n1110: Size of the stack guard expressed as a power of two in bytes.\n1111: \n1112: -param=stack-clash-protection-probe-interval=\n1113: Common Joined UInteger Var(param_stack_clash_protection_probe_interval) Init(12) IntegerRange(10, 16) Param Optimization\n1114: Interval in which to probe the stack expressed as a power of two in bytes.\n1115: \n"
  }
}
74. mcp__sourcegraph__sg_keyword_search @ -

Input

{
  "query": "repo:^github.com/sg-evals/gcc--96dfb333$ file:testsuite/gcc.target/i386/stack-clash"
}

Output

{
  "content": "{\"text\":\"# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\\n\"}",
  "structuredContent": {
    "text": "# github.com/sg-evals/gcc--96dfb333 – gcc/testsuite/gcc.target/i386/stack-clash-protection.c\n"
  }
}
75. mcp__sourcegraph__sg_read_file @ -

Input

{
  "repo": "github.com/sg-evals/gcc--96dfb333",
  "path": "gcc/explow.cc",
  "startLine": 1920,
  "endLine": 2000
}

Output

{
  "content": "{\"text\":\"URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.cc%3FL1920-2000\\n1920: \\n1921: \\t  if (CONST_INT_P (temp))\\n1922: \\t    {\\n1923: \\t      /* Use [base + disp} addressing mode if supported.  */\\n1924: \\t      HOST_WIDE_INT offset = INTVAL (temp);\\n1925: \\t      addr = memory_address (Pmode,\\n1926: \\t\\t\\t\\t     plus_constant (Pmode, last_addr,\\n1927: \\t\\t\\t\\t\\t\\t    STACK_GROW_OFF (offset)));\\n1928: \\t    }\\n1929: \\t  else\\n1930: \\t    {\\n1931: \\t      /* Manual CSE if the difference is not known at compile-time.  */\\n1932: \\t      temp = gen_rtx_MINUS (Pmode, size, rounded_size_op);\\n1933: \\t      addr = memory_address (Pmode,\\n1934: \\t\\t\\t\\t     gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,\\n1935: \\t\\t\\t\\t\\t\\t     last_addr, temp));\\n1936: \\t    }\\n1937: \\n1938: \\t  emit_stack_probe (addr);\\n1939: \\t}\\n1940:     }\\n1941: \\n1942:   /* Make sure nothing is scheduled before we are done.  */\\n1943:   emit_insn (gen_blockage ());\\n1944: }\\n1945: \\n1946: /* Compute parameters for stack clash probing a dynamic stack\\n1947:    allocation of SIZE bytes.\\n1948: \\n1949:    We compute ROUNDED_SIZE, LAST_ADDR, RESIDUAL and PROBE_INTERVAL.\\n1950: \\n1951:    Additionally we conditionally dump the type of probing that will\\n1952:    be needed given the values computed.  */\\n1953: \\n1954: void\\n1955: compute_stack_clash_protection_loop_data (rtx *rounded_size, rtx *last_addr,\\n1956: \\t\\t\\t\\t\\t  rtx *residual,\\n1957: \\t\\t\\t\\t\\t  HOST_WIDE_INT *probe_interval,\\n1958: \\t\\t\\t\\t\\t  rtx size)\\n1959: {\\n1960:   /* Round SIZE down to STACK_CLASH_PROTECTION_PROBE_INTERVAL */\\n1961:   *probe_interval\\n1962:     = 1 << param_stack_clash_protection_probe_interval;\\n1963:   *rounded_size = simplify_gen_binary (AND, Pmode, size,\\n1964: \\t\\t\\t\\t        GEN_INT (-*probe_interval));\\n1965: \\n1966:   /* Compute the value of the stack pointer for the last iteration.\\n1967:      It's just SP + ROUNDED_SIZE.  */\\n1968:   rtx rounded_size_op = force_operand (*rounded_size, NULL_RTX);\\n1969:   *last_addr = force_operand (gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,\\n1970: \\t\\t\\t\\t\\t      stack_pointer_rtx,\\n1971: \\t\\t\\t\\t\\t      rounded_size_op),\\n1972: \\t\\t\\t      NULL_RTX);\\n1973: \\n1974:   /* Compute any residuals not allocated by the loop above.  Residuals\\n1975:      are just the ROUNDED_SIZE - SIZE.  */\\n1976:   *residual = simplify_gen_binary (MINUS, Pmode, size, *rounded_size);\\n1977: \\n1978:   /* Dump key information to make writing tests easy.  */\\n1979:   if (dump_file)\\n1980:     {\\n1981:       if (*rounded_size == CONST0_RTX (Pmode))\\n1982: \\tfprintf (dump_file,\\n1983: \\t\\t \\\"Stack clash skipped dynamic allocation and probing loop.\\\\n\\\");\\n1984:       else if (CONST_INT_P (*rounded_size)\\n1985: \\t       && INTVAL (*rounded_size) <= 4 * *probe_interval)\\n1986: \\tfprintf (dump_file,\\n1987: \\t\\t \\\"Stack clash dynamic allocation and probing inline.\\\\n\\\");\\n1988:       else if (CONST_INT_P (*rounded_size))\\n1989: \\tfprintf (dump_file,\\n1990: \\t\\t \\\"Stack clash dynamic allocation and probing in \\\"\\n1991: \\t\\t \\\"rotated loop.\\\\n\\\");\\n1992:       else\\n1993: \\tfprintf (dump_file,\\n1994: \\t\\t \\\"Stack clash dynamic allocation and probing in loop.\\\\n\\\");\\n1995: \\n1996:       if (*residual != CONST0_RTX (Pmode))\\n1997: \\tfprintf (dump_file,\\n1998: \\t\\t \\\"Stack clash dynamic allocation and probing residuals.\\\\n\\\");\\n1999:       else\\n2000: \\tfprintf (dump_file,\\n2001: \"}",
  "structuredContent": {
    "text": "URL: https://demo.sourcegraph.com/github.com/sg-evals/gcc--96dfb333@baaf9b33ef307e3d2752a94e62274c374e6a5e20/-/blob/gcc/explow.cc%3FL1920-2000\n1920: \n1921: \t  if (CONST_INT_P (temp))\n1922: \t    {\n1923: \t      /* Use [base + disp} addressing mode if supported.  */\n1
...
76. Write @ -

Input

{
  "file_path": "/workspace/answer.json",
  "content": "{\n  \"files\": [\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/config/i386/i386.cc\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/explow.cc\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/explow.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/target.def\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/targhooks.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/function.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/testsuite/gcc.target/i386/stack-clash-protection.c\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/common.opt\"}\n  ],\n  \"symbols\": [\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_probe_stack_range\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe_stack_clash\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"compute_stack_clash_protection_loop_data\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"emit_stack_clash_protection_probe_loop_start\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"emit_stack_clash_protection_probe_loop_end\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/target.def\",\n      \"symbol\": \"TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/targhooks.h\",\n      \"symbol\": \"default_stack_clash_protection_alloca_probe_range\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/function.h\",\n      \"symbol\": \"stack_clash_probes\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/common.opt\",\n      \"symbol\": \"fstack-clash-protection\"\n    }\n  ],\n  \"chain\": [\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe_stack_clash\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"compute_stack_clash_protection_loop_data\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/target.def\",\n      \"symbol\": \"TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/testsuite/gcc.target/i386/stack-clash-protection.c\",\n      \"symbol\": \"stack-clash-protection\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/common.opt\",\n      \"symbol\": \"fstack-clash-protection\"\n    }\n  ],\n  \"text\": \"Stack clash protection in GCC is implemented across several files:\\n\\n1. **gcc/config/i386/i386.cc** — The x86_64/i386 target backend. Implements stack clash probing for x86 via `output_adjust_stack_and_probe` and `output_probe_stack_range`. These functions are declared in `gcc/config/i386/i386-protos.h` and invoked from machine description patterns in `gcc/config/i386/i386.md` (patterns `adjust_stack_and_probe_<mode>` and `probe_stack_range_<mode>`).\\n\\n2. **gcc/explow.cc** — The generic stack clash ex
...

Output

{
  "type": "create",
  "filePath": "/workspace/answer.json",
  "content": "{\n  \"files\": [\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/config/i386/i386.cc\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/explow.cc\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/explow.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/target.def\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/targhooks.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/function.h\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/testsuite/gcc.target/i386/stack-clash-protection.c\"},\n    {\"repo\": \"sg-evals/gcc--96dfb333\", \"path\": \"gcc/common.opt\"}\n  ],\n  \"symbols\": [\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_probe_stack_range\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe_stack_clash\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"compute_stack_clash_protection_loop_data\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"emit_stack_clash_protection_probe_loop_start\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"emit_stack_clash_protection_probe_loop_end\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/target.def\",\n      \"symbol\": \"TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/targhooks.h\",\n      \"symbol\": \"default_stack_clash_protection_alloca_probe_range\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/function.h\",\n      \"symbol\": \"stack_clash_probes\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/common.opt\",\n      \"symbol\": \"fstack-clash-protection\"\n    }\n  ],\n  \"chain\": [\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/config/i386/i386.cc\",\n      \"symbol\": \"output_adjust_stack_and_probe\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"anti_adjust_stack_and_probe_stack_clash\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/explow.cc\",\n      \"symbol\": \"compute_stack_clash_protection_loop_data\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/target.def\",\n      \"symbol\": \"TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/testsuite/gcc.target/i386/stack-clash-protection.c\",\n      \"symbol\": \"stack-clash-protection\"\n    },\n    {\n      \"repo\": \"sg-evals/gcc--96dfb333\",\n      \"path\": \"gcc/common.opt\",\n      \"symbol\": \"fstack-clash-protection\"\n    }\n  ],\n  \"text\": \"Stack clash protection in GCC is implemented across several files:\\n\\n1. **gcc/config/i386/i386.cc** — The x86_64/i386 target backend. Implements stack clash probing for x86 via `output_adjust_stack_and_probe` and `output_probe_stack_range`. These functions are declared in `gcc/config/i386/i386-protos.h` and invoked from machine description patterns in `gcc/config/i386/i386.md` (patterns `adjust_stack_and_probe_<mode>` and `probe_stack_range_<mode>`).\\n\\n2. **gcc/explow.cc** — The gen
...
Code Changes (1)
1. WRITE /workspace/answer.json
{
  "files": [
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/config/i386/i386.cc"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/explow.cc"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/explow.h"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/target.def"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/targhooks.h"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/function.h"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/testsuite/gcc.target/i386/stack-clash-protection.c"},
    {"repo": "sg-evals/gcc--96dfb333", "path": "gcc/common.opt"}
  ],
  "symbols": [
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/config/i386/i386.cc",
      "symbol": "output_adjust_stack_and_probe"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/config/i386/i386.cc",
      "symbol": "output_probe_stack_range"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "anti_adjust_stack_and_probe"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "anti_adjust_stack_and_probe_stack_clash"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "compute_stack_clash_protection_loop_data"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "emit_stack_clash_protection_probe_loop_start"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "emit_stack_clash_protection_probe_loop_end"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/target.def",
      "symbol": "TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/targhooks.h",
      "symbol": "default_stack_clash_protection_alloca_probe_range"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/function.h",
      "symbol": "stack_clash_probes"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/common.opt",
      "symbol": "fstack-clash-protection"
    }
  ],
  "chain": [
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/config/i386/i386.cc",
      "symbol": "output_adjust_stack_and_probe"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "anti_adjust_stack_and_probe_stack_clash"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/explow.cc",
      "symbol": "compute_stack_clash_protection_loop_data"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/target.def",
      "symbol": "TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/testsuite/gcc.target/i386/stack-clash-protection.c",
      "symbol": "stack-clash-protection"
    },
    {
      "repo": "sg-evals/gcc--96dfb333",
      "path": "gcc/common.opt",
      "symbol": "fstack-clash-protection"
    }
  ],
  "text": "Stack clash protection in GCC is implemented across several files:\n\n1. **gcc/config/i386/i386.cc** — The x86_64/i386 target backend. Implements stack clash probing for x86 via `output_adjust_stack_and_probe` and `output_probe_stack_range`. These functions are declared in `gcc/config/i386/i386-protos.h` and invoked from machine description patterns in `gcc/config/i386/i386.md` (patterns `adjust_stack_and_probe_<mode>` and `probe_stack_range_<mode>`).\n\n2. **gcc/explow.cc** — The generic stack clash expansion. Key functions:\n   - `anti_adjust_stack_and_probe` (line 2200): general stack adjustment with probing\n   - `anti_adjust_stack_and_probe_stack_clash` (line 2072): stack clash-specific probing that probes every page and never skips probes\n   - `compute_stack_clash_protection_loop_data` (line 1954): computes rounded_size, last_addr, residual and probe_interval for dynamic allocations\n   - `emit_stack_clash_protection_probe_lo...
Bash Commands (0)

No bash commands.