Re: [RFC][PATCH] parisc: Fix left-shift assembly to be PA1.1 compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-10-19 11:34 AM, Helge Deller wrote:
  	.macro shlw r, sa, t
+#if defined(CONFIG_PA20)
+	/* The PA 2.0 shift left (shlw) */
  	depw,z	\r, 31-(\sa), 32-(\sa), \t
+#elif defined(CONFIG_PA11)
+	/* The PA 1.1 shift left (zdep) */
+	zdep	\r, 31-(\sa), 32-(\sa), \t
+#else
+	#warning "Revisit shlw callers to support PA1.0"
+	/* PA 1.0: Note the r and t can NOT be the same! */
+	dep,z   \r, 31-(\sa), 32-(\sa), \t
+#endif
  	.endm
This is not necessary.  The existing define for shlw works.

The zdep and depw,z mnemonics generate the same code.  The assembler will accepts the depw,z mnemonic when generating PA 1.x code.  The zdep mnemonic is okay when generating PA 2.0 code.  If you want, change depw,z to zdep in the current shlw macro but the binary code will be the same.

The dep,z instruction is wrong.  "z" is not a valid condition code. PA 1.0 had zdep.  As far as I know, it didn't behave differently from PA 1.1.  There would have been a note in the PA 1.1 architecture manual
if it did.  PA 1.1 is forward compatible with PA 1.0.

Dave

--
John David Anglin  dave.anglin@xxxxxxxx




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux