1. A method for updating an existing error-correcting code for a line when only a portion of the line is updated during a store operation, comprising: receiving the store operation, wherein the store operation includes new data to be stored to the portion of the line, as well as an address of the portion of the line; reading old data for the portion of the line from the address; storing the new data to the portion of the line at the address; and updating the existing error-correcting code for the line to reflect the new data by, calculating a new error-correcting code for the line from the existing error-correcting code, the old data and the new data, and replacing the existing error-correcting code with the new error-correcting code.