This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] powerpc: Fix operand prefixes
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, tuliom at linux dot vnet dot ibm dot com
- Date: Wed, 20 Apr 2016 17:10:56 -0500
- Subject: Re: [PATCH 2/2] powerpc: Fix operand prefixes
- Authentication-results: sourceware.org; auth=none
- References: <1461185716-7332-2-git-send-email-gftg at linux dot vnet dot ibm dot com>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Wed, 2016-04-20 at 17:55 -0300, Gabriel F. T. Gomes wrote:
> The file sysdeps/powerpc/sysdeps.h defines aliases for control register
> operands. E.g.: 'cr7' means control register 7. On the one hand, this
> increases readability, as it makes it easier for readers to know whether the
> operand is a control register, a general purpose register or an immediate. On
> the other hand, this permits that control register be written as if they were
> general purpose, and vice-versa, thus reducing the readability of the code.
>
I think you mean condition registers, and there are instructions that
will correctly update a specific cr# (cmpdi for example).
But li and ld are not examples of instructions that do that.