Browse Prior Art Database

Pipelined String Manipulation Algorithm

IP.com Disclosure Number: IPCOM000060138D
Original Publication Date: 1986-Mar-01
Included in the Prior Art Database: 2005-Mar-08
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Lang, TG: AUTHOR

Abstract

A method is described to maximize the performance of string operations on a microprocessor. The byte string operations on the microprocessor assume these requirements: 1. The string may be any length from one to 65535 bytes. 2. The address of the source string may be on any byte boundary. 3. The address of the destination string may also be on any byte boundary, not necessarily the same as the source string's boundary. The microprocessor performs at maximum speed when operating on 4 bytes at a time, but the 4-byte quantities must be on 4-byte boundaries. The microprocessor can work with 2-byte quantities on 2-byte boundaries and 1-byte quantities on 1-byte boundaries.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 90% of the total text.

Page 1 of 1

Pipelined String Manipulation Algorithm

A method is described to maximize the performance of string operations on a microprocessor. The byte string operations on the microprocessor assume these requirements: 1. The string may be any length from one to 65535 bytes. 2. The address of the source string may be on any byte boundary. 3. The address of the destination string may also be on any byte boundary, not necessarily the same as the source string's boundary. The microprocessor performs at maximum speed when operating on 4 bytes at a time, but the 4-byte quantities must be on 4-byte boundaries. The microprocessor can work with 2-byte quantities on 2- byte boundaries and 1-byte quantities on 1-byte boundaries. The problem is to maximize the use of the multi-byte functions while taking into consideration its even byte boundary constraints while working with odd- length strings at odd- boundary addresses. Maximizing the use of multi-byte functions is accomplished by using two of the microprocessor's 4-byte internal registers as a "pipeline". The following description pertains to a string move operation; however, the general technique is applicable to all byte string operations. As the string operation is started, 1-byte quantities are loaded into the pipe until the source string is on a 4-byte boundary, then 1- or 2-byte quantities are taken from the pipe and stored at the destination string until it is also on a 4-byte boundary. Once the boundaries are aligned, 4-by...