Skip to content

Conversation

@Saiiijchan
Copy link
Contributor

Currently, vector registers are not placed continuously in the stack. Place v31 - v0 in order from high address to low address to facilitate debugger analysis of task stack context.

Vector general register layout:

Before:
+--------------+ <-- High Address
| v7 |
+--------------+
| v6 |
+--------------+
| ... |
+--------------+
| v0 |
+--------------+ <-- v0 - v7
| v15 |
+--------------+
| v14 |
+--------------+
| ... |
+--------------+
| v8 |
+--------------+ <-- v8 - v15
| ... |
+--------------+
| v24 |
+--------------+ <-- Low address

After:
+--------------+ <-- High Address
| v31 |
+--------------+
| v30 |
+--------------+
| ... |
+--------------+
| v1 |
+--------------+
| v0 |
+--------------+ <-- Low Address

Description

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Vector general register layout:

Before:
+--------------+  <-- High Address
|      v7      |
+--------------+
|      v6      |
+--------------+
|      ...     |
+--------------+
|      v0      |
+--------------+  <-- v0 - v7
|      v15     |
+--------------+
|      v14     |
+--------------+
|      ...     |
+--------------+
|      v8      |
+--------------+  <-- v8 - v15
|      ...     |
+--------------+
|      v24     |
+--------------+  <-- Low address

After:
+--------------+  <-- High Address
|      v31     |
+--------------+
|      v30     |
+--------------+
|      ...     |
+--------------+
|      v1      |
+--------------+
|      v0      |
+--------------+ <-- Low Address

Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant