Ah, yes. Phew! I've been thinking that needs to be cleared up a bit, but I'm not sure how. The maximum number of 5th level spells a Swordsaint 20 can even know should only be 4, but yeah, he would then be able to choose any two of his spells when his spells are granted (probably two of his 5th level ones), and six additional spells would be granted to him at random from his 12 spells known.
EDIT: Added a separate clause in the Swordsaint's spellcasting allowing him to persist buffs active on himself when he reduces a foe to 0 or fewer hitpoints rather than recover a cast spell. Because it becomes tedious having to continue spending your standard actions over and over again just to get a nifty spell effect.
I also added in the full description of the Saintly Resolve ability, so that people without the Tome of Battle can enjoy this class.