linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yanteng Si <siyanteng@loongson.cn>
To: corbet@lwn.net
Cc: Yanteng Si <siyanteng@loongson.cn>,
	alexs@kernel.org, chenhuacai@kernel.org, jiaxun.yang@flygoat.com,
	linux-doc@vger.kernel.org, realpuyuwang@gmail.com,
	bobwxc@email.cn, siyanteng01@gmail.com,
	huangjianghui@uniontech.com
Subject: [PATCH 3/3] docs/zh_CN: add parisc registers.rst translation
Date: Thu, 29 Apr 2021 11:33:35 +0800	[thread overview]
Message-ID: <45fb9f5b1000c99dff42aabbcfec94e429926235.1619665430.git.siyanteng@loongson.cn> (raw)
In-Reply-To: <cover.1619665430.git.siyanteng@loongson.cn>

This patch translates Documentation/parisc/registers.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/parisc/index.rst       |   2 +-
 .../translations/zh_CN/parisc/registers.rst   | 153 ++++++++++++++++++
 2 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/parisc/registers.rst

diff --git a/Documentation/translations/zh_CN/parisc/index.rst b/Documentation/translations/zh_CN/parisc/index.rst
index b913d664e735..a47454ebe32e 100644
--- a/Documentation/translations/zh_CN/parisc/index.rst
+++ b/Documentation/translations/zh_CN/parisc/index.rst
@@ -14,10 +14,10 @@ PA-RISC体系架构
    :maxdepth: 2
 
    debugging
+   registers
 
 Todolist:
 
-   registers
    features
 
 .. only::  subproject and html
diff --git a/Documentation/translations/zh_CN/parisc/registers.rst b/Documentation/translations/zh_CN/parisc/registers.rst
new file mode 100644
index 000000000000..7a2193674cb0
--- /dev/null
+++ b/Documentation/translations/zh_CN/parisc/registers.rst
@@ -0,0 +1,153 @@
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/parisc/registers.rst
+:Translator: Yanteng Si <siyanteng@loongson.cn>
+
+.. _cn_parisc_registers:
+
+=========================
+Linux/PA-RISC的寄存器用法
+=========================
+
+[ 用星号表示目前尚未实现的计划用途。 ]
+
+ABI约定的通用寄存器
+===================
+
+控制寄存器
+----------
+
+============================    =================================
+CR 0 (恢复计数器)               用于ptrace
+CR 1-CR 7(无定义)               未使用
+CR 8 (Protection ID)            每进程 value*
+CR 9, 12, 13 (PIDS)             未使用的
+CR10 (CCR)                      懒惰FPU saving*
+CR11                            按照ABI的规定(SAR)。
+CR14 (中断向量)                 初始化为 fault_vector
+CR15 (EIEM)                     初始化为所有的 ones*
+CR16 (间隔计时器)               读取周期数/写入开始时间间隔 Tmr
+CR17-CR22                       中断参数
+CR19                            中断指令寄存器
+CR20                            中断空间寄存器
+CR21                            中断偏移量寄存器
+CR22                            中断 PSW
+CR23 (EIRR)                     读取未决中断/写入清除位
+CR24 (TR 0)                     内核空间页目录指针
+CR25 (TR 1)                     用户空间页目录指针
+CR26 (TR 2)                     不使用
+CR27 (TR 3)                     线程描述符指针
+CR28 (TR 4)                     不使用
+CR29 (TR 5)                     不使用
+CR30 (TR 6)                     当 / 0
+CR31 (TR 7)                     临时寄存器,在不同地方使用
+============================    =================================
+
+空间寄存器(内核模式)
+----------------------
+
+========                        ==============================
+SR0                             临时空间寄存器
+SR4-SR7                         设置为0
+SR1                             临时空间寄存器
+SR2                             内核不应该破坏它
+SR3                             用于用户空间访问(当前进程)。
+========                        ==============================
+
+空间寄存器(用户模式)
+----------------------
+
+========                        ============================
+SR0                             临时空间寄存器
+SR1                             临时空间寄存器
+SR2                             保存Linux网关页的空间
+SR3                             在内核中保存用户地址空间的值
+SR4-SR7                         定义了用户/内核的短地址空间
+========                        ============================
+
+
+处理器状态字
+------------
+
+======================          ================================================
+W (64位地址)                  0
+E (小尾端)                    0
+S (安全间隔计时器)            0
+T (产生分支陷阱)              0
+H (高特权级陷阱)              0
+L (低特权级陷阱)              0
+N (撤销下一条指令)            被C代码使用
+X (数据存储中断禁用)          0
+B (产生分支)                  被C代码使用
+C (代码地址转译)              1, 在执行实模式代码时为0
+V (除法步长校正)              被C代码使用
+M (HPMC 掩码)                 0, 在执行HPMC handler* 时为1
+C/B (进/借 位)                被C代码使用
+O (有序引用)                  1*
+F (性能监视器)                0
+R (回收计数器陷阱)            0
+Q (收集中断状态)              1 (在rfi之前的代码中为0)
+P (保护标识符)                1*
+D (数据地址转译)              1, 在执行实模external interrupt mask式代码时为0
+I (外部中断掩码)              由cli()/sti()宏使用。
+======================          ================================================
+
+“隐形” 寄存器(影子寄存器)
+---------------------------
+
+=============                   ===================
+PSW W 默认值                    0
+PSW E 默认值                    0
+影子寄存器                      被中断处理代码使用
+TOC启用位                       1
+=============                   ===================
+
+----------------------------------------------------------
+
+PA-RISC架构定义了7个寄存器作为 "影子寄存器"。这些寄存器在
+RETURN FROM INTERRUPTION AND RESTORE指令中使用,通过消
+除中断处理程序中对一般寄存器(GR)的保存和恢复的需要来减
+少状态保存和恢复时间。影子寄存器是GRs 1, 8, 9, 16, 17,
+24和25。
+
+-------------------------------------------------------------------------
+
+寄存器使用说明,最初由约翰-马文提供,并由Randolph Chung提供一些补充说明。
+
+对于通用寄存器:
+
+r1,r2,r19-r26,r28,r29 & r31可以在不保存它们的情况下被使用。当然,如果你
+关心它们,在调用另一个程序之前,你也需要保存它们。上面的一些寄存器确实
+有特殊的含义,你应该注意一下:
+
+    r1:
+    addil指令是硬性规定将其结果放在r1中,所以如果你使用这条指令要
+    注意这点。
+
+    r2:
+    这就是返回指针。一般来说,你不想使用它,因为你需要这个指针来返
+    回给你的调用者。然而,它与这组寄存器组合在一起,因为调用者不能
+    依赖你返回时的值是相同的,也就是说,你可以将r2复制到另一个寄存
+    器,并在作废r2后通过该寄存器返回,这应该不会给调用程序带来问题。
+
+    r19-r22:
+    这些通常被认为是临时寄存器。
+    请注意,在64位中它们是arg7-arg4。
+
+    r23-r26:
+    这些是arg3-arg0,也就是说,如果你不再关心传入的值,你可以使用
+    它们。
+
+    r28,r29:
+    是ret0和ret1。它们是你传递返回值的东西。r28是主要的返回。当返
+    回小结构时,r29也可以用来将数据传回给调用者。
+
+    r30:
+    栈指针
+
+    r31:
+    ble指令将返回指针放在这里。
+
+
+    r3-r18,r27,r30需要被保存和恢复。r3-r18只是一般用途的寄存器。
+    r27是数据指针,用来使对全局变量的引用更容易。r30是栈指针。
-- 
2.27.0


  parent reply	other threads:[~2021-04-29  3:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  3:33 [PATCH 0/3] docs/zh_CN: add parisc Chinese documents Yanteng Si
2021-04-29  3:33 ` [PATCH 1/3] docs/zh_CN: add parisc index translation Yanteng Si
2021-04-29 15:10   ` Wu X.C.
2021-04-29 16:16     ` Jonathan Corbet
     [not found]       ` <CAEensMxWmRppXmxuYEsq-jS-psQ8N1Zim-d+CCOckig__RfN5w@mail.gmail.com>
2021-04-30  6:59         ` yanteng si
2021-04-29  3:33 ` [PATCH 2/3] docs/zh_CN: add parisc debugging.rst translation Yanteng Si
2021-04-29 15:13   ` Wu X.C.
2021-05-04  6:56     ` yanteng si
2021-05-04  8:25       ` Wu X.C.
2021-05-06  6:09         ` yanteng si
2021-04-29  3:33 ` Yanteng Si [this message]
2021-04-29 15:15   ` [PATCH 3/3] docs/zh_CN: add parisc registers.rst translation Wu X.C.
2021-05-04  7:26     ` yanteng si
2021-05-06  9:48       ` yanteng si
2021-05-07  2:15         ` Wu X.C.
2021-05-07  3:00           ` yanteng si

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45fb9f5b1000c99dff42aabbcfec94e429926235.1619665430.git.siyanteng@loongson.cn \
    --to=siyanteng@loongson.cn \
    --cc=alexs@kernel.org \
    --cc=bobwxc@email.cn \
    --cc=chenhuacai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=huangjianghui@uniontech.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=realpuyuwang@gmail.com \
    --cc=siyanteng01@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).